A point cloud data compression and decompression method and device

By dividing the point cloud data into voxels from the center of the cube outwards, and combining accuracy and traversal order, the compressed data of 3D points is directly determined, which solves the problem of slow point cloud data compression speed in the existing technology and achieves a more efficient compression effect.

CN114419291BActive Publication Date: 2025-11-25BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210049984.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2025-11-25
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

Existing point cloud data compression methods based on octree recursive partitioning have high space complexity, resulting in slow compression speeds and making it difficult to meet real-time compression requirements.

Method used

The method involves dividing the cube into voxels from the center outwards to determine the first sub-cube for each layer, and then dividing the second sub-cube according to the precision. Combined with the preset traversal order and labels, the compressed data of the three-dimensional points is directly determined.

Benefits of technology

It reduces the space complexity of the algorithm, improves the compression efficiency of point cloud data, and meets the needs of real-time compression.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419291B_ABST
    Figure CN114419291B_ABST
Patent Text Reader

Abstract

The specification discloses a point cloud data compression and decompression method and device. Firstly, a cube surrounding the point cloud data and a preset layer number are used to divide the cube into first sub-cubes, and the first sub-cubes are divided into second sub-cubes according to the preset accuracy of each layer. Then, a preset traversal order is used to determine first identifiers corresponding to the first sub-cubes and second identifiers corresponding to the second sub-cubes. Thus, the first identifiers and the second identifiers corresponding to each three-dimensional point can be determined according to the second sub-cubes in which the three-dimensional point falls in the first sub-cube, and the compression data corresponding to each three-dimensional point can be determined. Since the cube, the layer number and the accuracy can be determined in advance, the compression data corresponding to each three-dimensional point can be determined according to the coordinates of the three-dimensional point, the spatial complexity of the algorithm is reduced, and the compression efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the computer technical field, and particularly relates to a point cloud data compression and decompression method and device. BACKGROUND

[0002] At present, with the development of computer technology, the application of point cloud technology is also rising. Since the original point cloud data is large in quantity, in order to meet the transmission or storage requirements, the original point cloud data often needs to be compressed.

[0003] In the prior art, when compression is performed, a cube including all point cloud data is preset, then the cube is recursively voxelized in an octree manner according to a preset maximum recursion depth, until a stop condition of the division is met. Finally, according to a preset encoding rule, all the divided cubes are encoded, and the positions of points in the original point cloud data are represented by the encoding of the smallest cube including each point. The stop condition of the division can be that the division reaches the recursion depth, or a small cube does not include any point cloud data.

[0004] However, the recursive division based on the octree has a high space complexity of the algorithm, so the compression speed is slow, which makes it difficult to adapt to the scene requiring fast and real-time compression of point cloud data. Therefore, there is an urgent need for a method capable of quickly compressing point cloud data to improve the compression efficiency. SUMMARY

[0005] The point cloud data compression and decompression method and device provided by the embodiments of the present application at least partially solve the problems in the prior art.

[0006] The technical scheme adopted by the present application is as follows:

[0007] The present application provides a point cloud data compression method, comprising:

[0008] obtaining point cloud data, and determining a cube surrounding the point cloud data;

[0009] According to a preset number of layers, voxelizing the cube from the center of the cube outward, determining first sub-cubes corresponding to each layer, and according to a preset accuracy of each layer, voxelizing the first sub-cubes corresponding to each layer to determine second sub-cubes corresponding to each first sub-cube;

[0010] According to a preset traversal order of three-dimensional space, determining first identifiers corresponding to the first sub-cubes and second identifiers corresponding to the second sub-cubes;

[0011] Based on the coordinates of each 3D point in the point cloud data, the side length of the cube, and the number of layers, the first sub-cube and the first identifier that each 3D point falls into are determined respectively.

[0012] Based on the coordinates of each three-dimensional point, the first sub-cube into which each three-dimensional point falls, the side length of the cube, and the preset precision of each layer, the second sub-cube into which each three-dimensional point falls and the second identifier are determined respectively.

[0013] Based on the first and second identifiers corresponding to each three-dimensional point, the compressed data corresponding to each three-dimensional point is determined and stored.

[0014] Optionally, based on the preset precision of each layer, each first sub-cube corresponding to each layer is voxelized to determine each second sub-cube corresponding to each first sub-cube, specifically including:

[0015] Based on the preset precision of each layer, determine the number of divisions for each first sub-cube corresponding to each layer;

[0016] Based on the number of divisions corresponding to each layer, the first sub-cubes corresponding to each layer are divided into voxels to determine the second sub-cubes corresponding to each first sub-cube.

[0017] The closer to the center of the cube, the higher the preset accuracy.

[0018] Optionally, determining the first identifier corresponding to each of the first sub-cubes and the second identifier corresponding to each of the second sub-cubes according to a preset order of traversing the three-dimensional space specifically includes:

[0019] Based on the preset order of traversing the three-dimensional space, determine each traversal row composed of each sub-cube and the traversal order of each traversal row;

[0020] The method involves sequentially traversing each traversal row according to the traversal order and determining the identifier corresponding to the sub-cube in a single traversal row according to the row direction order, thereby determining each first identifier corresponding to each first sub-cube and each second identifier corresponding to each second sub-cube.

[0021] Optionally, based on the coordinates of each 3D point in the point cloud data, the side length of the cube, and the number of layers, the first sub-cube into which each 3D point falls is determined, specifically including:

[0022] Based on the coordinates of each 3D point in the point cloud data and the side length of the cube, determine the coordinates of each 3D point after coordinate transformation based on the coordinate system of the cube;

[0023] The side length of the first sub-cube is determined based on the side length of the cube and the number of layers.

[0024] Based on the transformed coordinates of each three-dimensional point and the side length of the first sub-cube, the first sub-cube into which each three-dimensional point falls is determined.

[0025] Optionally, based on the coordinates of each 3D point, the first sub-cube into which each 3D point falls, the side length of the cube, and the preset precision of each layer, the second sub-cube into which each 3D point falls is determined, specifically including:

[0026] Based on the coordinates of each three-dimensional point and the first sub-cube into which each three-dimensional point falls, determine the coordinates of each three-dimensional point after coordinate transformation based on the coordinate system of the first sub-cube;

[0027] For the coordinates of each 3D point, the side length of the second sub-cube corresponding to the first sub-cube is determined based on the first sub-cube into which the 3D point falls, the preset precision of the layer where the first sub-cube is located, and the side length of the cube.

[0028] Based on the transformed coordinates of the 3D point and the side length of the second sub-cube, determine the second sub-cube into which the 3D point falls within the first sub-cube it falls into.

[0029] Optionally, based on the first identifier and the second identifier corresponding to each three-dimensional point, the compressed data corresponding to each three-dimensional point is determined, specifically including:

[0030] For each 3D point, the compressed data of the 3D point is determined based on the first identifier and the second identifier corresponding to the 3D point;

[0031] Based on the stored compressed data, determine whether the compressed data of the three-dimensional point is consistent with the stored compressed data;

[0032] If so, then the compressed data for that 3D point will not be stored;

[0033] If not, then store the compressed data of that 3D point.

[0034] This specification provides a method for decompressing point cloud data, including:

[0035] Obtain the compressed data corresponding to each 3D point in the stored point cloud data, and determine the preset cube and number of layers surrounding the point cloud data;

[0036] For each compressed data, determine the first identifier and the second identifier contained in the compressed data;

[0037] Based on the first identifier, the side length of the cube, and the number of layers, determine the coordinates of the first sub-cube corresponding to the compressed data;

[0038] Based on the second identifier, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube, the coordinates of the second sub-cube corresponding to the compressed data are determined;

[0039] Based on the coordinates of the first sub-cube and the second sub-cube corresponding to the compressed data, the coordinates of the three-dimensional point corresponding to the compressed data are determined.

[0040] Optionally, the coordinates of the first sub-cube corresponding to the compressed data are determined based on the first identifier, the side length of the cube, and the number of layers, specifically including:

[0041] Based on the first identifier and the preset order of traversing the three-dimensional space, determine the position of the first sub-cube corresponding to the compressed data within the cube;

[0042] The side length of the first sub-cube is determined based on the side length of the cube and the number of layers.

[0043] The coordinates of the first sub-cube corresponding to the compressed data are determined based on the position of the first sub-cube and the side length of the first sub-cube.

[0044] Optionally, the coordinates of the second sub-cube corresponding to the compressed data are determined based on the second identifier, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube. Specifically, this includes:

[0045] Based on the second identifier and the preset order of traversing the three-dimensional space, determine the position of the second sub-cube corresponding to the compressed data within the first sub-cube;

[0046] The side length of the second sub-cube is determined based on the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube.

[0047] The coordinates of the second sub-cube corresponding to the compressed data are determined based on the position of the second sub-cube and the side length of the second sub-cube.

[0048] This specification provides a point cloud data compression device, including:

[0049] The acquisition module is used to acquire point cloud data and determine the cube surrounding the point cloud data;

[0050] The partitioning module is used to partition the cube from the center outwards according to a preset number of layers, determine the first sub-cube corresponding to each layer, and partition each first sub-cube corresponding to each layer according to a preset precision, to determine each second sub-cube corresponding to each first sub-cube.

[0051] The traversal module is used to determine the first identifier corresponding to each first sub-cube and the second identifier corresponding to each second sub-cube according to the preset traversal order of the three-dimensional space.

[0052] The first identifier determination module is used to determine the first sub-cube and the first identifier that each three-dimensional point falls into based on the coordinates of each three-dimensional point in the point cloud data, the side length of the cube, and the number of layers.

[0053] The second identifier determination module is used to determine the second sub-cube and the second identifier of each three-dimensional point based on the coordinates of each three-dimensional point, the first sub-cube into which each three-dimensional point falls, the side length of the cube, and the preset precision of each layer.

[0054] The compression module is used to determine and store the compressed data corresponding to each three-dimensional point based on the first identifier and the second identifier corresponding to each three-dimensional point.

[0055] This specification provides a point cloud data decompression device, including:

[0056] The acquisition module is used to acquire the compressed data corresponding to each three-dimensional point in the stored point cloud data, and to determine the preset cube and number of layers surrounding the point cloud data.

[0057] The identifier determination module is used to determine, for each compressed data, a first identifier and a second identifier contained in the compressed data;

[0058] The first coordinate determination module is used to determine the coordinates of the first sub-cube corresponding to the compressed data based on the first identifier, the side length of the cube, and the number of layers.

[0059] The second coordinate determination module is used to determine the coordinates of the second sub-cube corresponding to the compressed data based on the second identifier, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube.

[0060] The decompression module is used to determine the coordinates of the three-dimensional point corresponding to the compressed data based on the coordinates of the first sub-cube and the second sub-cube corresponding to the compressed data.

[0061] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described point cloud data compression method or point cloud data decompression method.

[0062] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described point cloud data compression method or point cloud data decompression method.

[0063] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0064] The point cloud data compression and decompression method provided in this specification first divides the cube surrounding the point cloud data into voxels from the center outwards to determine the first sub-cube corresponding to each layer, based on the cube surrounding the point cloud data and a preset number of layers. Then, according to the preset precision of each layer, the first sub-cube corresponding to each layer is further divided into voxels to determine the second sub-cubes corresponding to each first sub-cube. Next, according to a preset traversal order, a first identifier corresponding to each first sub-cube and a second identifier corresponding to each second sub-cube are determined. This allows for the determination of the first and second identifiers corresponding to each 3D point based on the first sub-cube into which the point cloud data falls, and the second sub-cube into which it falls within the first sub-cube. Based on this, the compressed data corresponding to each 3D point is determined. Since the cube, the number of layers, and the precision can be predetermined, the compressed data can be directly determined based on the coordinates of each 3D point during actual compression, reducing the space complexity of the algorithm and improving compression efficiency. Attached Figure Description

[0065] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0066] Figure 1 This is a schematic diagram of a point cloud data compression method provided in this specification;

[0067] Figure 2 This is a schematic diagram of a first sub-cube partitioning provided in this specification;

[0068] Figure 3 This is a schematic diagram of a second sub-cube partitioning provided in this specification;

[0069] Figure 4 This is a schematic diagram of a three-dimensional spatial traversal order provided in this specification;

[0070] Figure 5 This is a schematic diagram of coordinate transformation provided in this specification;

[0071] Figure 6 This is another coordinate transformation diagram provided in this specification;

[0072] Figure 7 This is a flowchart illustrating a point cloud data decompression method provided in this manual;

[0073] Figure 8 This is a schematic diagram of a point cloud data compression device provided in this specification;

[0074] Figure 9 This is a schematic diagram of a point cloud data decompression device provided in this specification;

[0075] Figure 10 This is a schematic diagram of an electronic device for implementing a point cloud data compression method or a point cloud data decompression method, as provided in this specification. Detailed Implementation

[0076] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments in this specification without creative effort are within the scope of protection of this application.

[0077] Currently, with the rise of point cloud data applications, many fields are able to collect and apply point cloud data in various ways. For example, point cloud data can be collected via airborne or vehicle-mounted methods, and then used for 3D reconstruction, mapping, and other tasks. Typically, the sensors that collect point cloud data transmit the collected data back to a server. However, to reduce transmission overhead, the sensors compress the point cloud data before transmitting it back.

[0078] Generally, point cloud data compression is based on recursive partitioning using an octree. First, a cube enclosing the point cloud data is determined. Then, based on the maximum recursion depth, the cube is recursively partitioned into voxels using an octree until the maximum recursion depth is reached or a small cube contains no point cloud data. Finally, according to the order of traversing the 3D space, the encoding of each small cube is determined, and the position of each point is represented by the smallest encoding of each cube.

[0079] However, octree-based point cloud data compression requires recursively dividing the cube, resulting in slow compression speed and potentially limiting the frequency of point cloud data acquisition by sensors. Furthermore, in scenarios where servers need to acquire point cloud data in real-time, the compression speed of the point cloud data by the sensor can affect the real-time performance of the data acquired by the server, even with a stable data transmission rate.

[0080] Typically, to reduce costs, sensors that collect point cloud data are mounted on autonomous vehicles such as drones or unmanned vehicles, and the collected point cloud data is compressed before being sent back to a server. Therefore, for ease of description, this manual will subsequently use the example of an autonomous vehicle compressing the point cloud data and the server decompressing the point cloud data.

[0081] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0082] Figure 1 This is a flowchart illustrating a point cloud data compression method described in this specification, which specifically includes the following steps:

[0083] S100: Acquire point cloud data and determine the cube surrounding the point cloud data.

[0084] In practical applications, autonomous driving devices need to continuously perceive the surrounding driving environment through sensors during operation and transmit the perceived data back to the server according to business requirements. Since point cloud data is often very large, autonomous driving devices need to compress the point cloud data to reduce transmission pressure. Similarly, in one or more embodiments of this description, this point cloud data compression process can also be performed by the autonomous driving device.

[0085] Specifically, before compressing point cloud data, the autonomous vehicle can first acquire point cloud data through sensors. Since point cloud data is generally a discrete set of a large number of three-dimensional points, it is difficult to compress directly. Therefore, the autonomous vehicle can determine the cube surrounding the point cloud data, so that subsequent steps can use the cube to compress the point cloud data.

[0086] This manual does not restrict the specific sensors or methods used by the autonomous driving device to acquire point cloud data. For example, the autonomous driving device may use LiDAR to scan the surrounding environment at preset time intervals to acquire point cloud data.

[0087] In addition, the size of the cube surrounding the point cloud data can be determined according to the actual situation or business needs. This specification does not impose any restrictions on the size of the cube.

[0088] Specifically, the autonomous driving device can determine the size of the cube based on the pre-stored data acquisition radius of the sensor. For example, when the sensor's acquisition radius is 180 meters, a cube with a side length of 360 meters centered on the sensor can be determined.

[0089] Alternatively, the autonomous vehicle can determine a preset data acquisition radius based on business needs, and then determine the size of the cube. For example, assuming a 3D reconstruction task only requires reconstructing the environment within 100 meters of the autonomous vehicle, a cube with a side length of 200 meters centered on the sensor can be determined. Of course, since the accuracy of data collected by the sensor generally decreases the further away it is, setting a preset data acquisition radius can also filter out 3D points with lower accuracy, further reducing the amount of point cloud data to be compressed.

[0090] The unmanned driving equipment mentioned in this manual includes unmanned passenger vehicles, unmanned delivery equipment, drones, unmanned boats, and other devices capable of autonomous driving. For ease of explanation, the following description focuses solely on unmanned driving equipment.

[0091] S102: Based on the preset number of layers, the cube is divided into voxels from the center outward to determine each first sub-cube corresponding to each layer. Based on the preset precision of each layer, each first sub-cube corresponding to each layer is divided into voxels to determine each second sub-cube corresponding to each first sub-cube.

[0092] In one or more embodiments of this specification, after determining the cube surrounding the point cloud data as described above, the autonomous driving device can divide the cube into voxels from the center outwards according to a preset number of layers, determining each first sub-cube corresponding to each layer. Then, according to a preset precision for each layer, it can further divide each first sub-cube into voxels, determining each second sub-cube corresponding to each first sub-cube. Subsequently, the autonomous driving device can use the spatial positions of the first and second sub-cubes to represent each three-dimensional point in the point cloud data, thereby compressing the coordinates of the three-dimensional points.

[0093] Specifically, the autonomous driving device first divides the cube determined in step S100 into voxels from the center outwards according to a preset number of layers, determining the first sub-cube for each layer. The preset number of layers can be determined based on business needs; this specification does not impose a specific numerical limit on the number of layers. For example, assuming the determined cube has a side length of 360 meters, and the autonomous driving device primarily determines motion decisions based on 3D points within a 60-meter radius, then the preset number of layers can be 2. This results in one layer of first sub-cubes within a 60-meter radius of the autonomous driving device, and another layer of first sub-cubes beyond a 60-meter radius. An example of a layer count of 2 is shown below. Figure 2 As shown.

[0094] Figure 2 This is a schematic diagram of a first sub-cube partitioning provided in this specification. Figure 2The largest cube in the hierarchy is the cube that encloses the point cloud data. At the center of this cube, the smaller cube formed by the dashed lines is the first sub-cube of the first layer. For ease of description, Figure 2 Only the first sub-cube of the first layer is shown as an example, and the division of the second layer is omitted. In fact, the second layer of the cube is also divided, and after the division, the two layers can be divided into 27 first sub-cubes of the same size.

[0095] Secondly, after dividing each first sub-cube, the unmanned driving device can continue to divide each first sub-cube corresponding to each layer into voxels according to the preset accuracy of each layer.

[0096] Specifically, the autonomous driving device can first determine the number of divisions of each first sub-cube corresponding to each layer based on the preset accuracy of each layer, and then perform voxel division on each first sub-cube corresponding to each layer based on the number of divisions of each layer, and determine each second sub-cube corresponding to each first sub-cube.

[0097] The closer to the center of the cube, the higher the preset precision. Of course, the preset precision for each layer can be determined according to specific circumstances and business needs; this specification does not limit the specific numerical value of the preset precision for each layer. The number of divisions refers to the number of divisions in each dimension when voxelizing each first sub-cube corresponding to each layer. Specifically, the number of divisions for each first sub-cube corresponding to each layer can be determined based on the number of layers, the side length of the cube, and the preset precision for each layer.

[0098] For example, taking a cube with a side length of 360 meters, 2 layers, a first layer with a precision of millimeters, and a second layer with a precision of decimeters as an example, when dividing the first sub-cube, each dimension of the cube is divided into 3 parts (i.e., 2×2-1). Thus, the side length of the first cube is 120 meters. Based on the precision of the first layer being millimeters, the number of divisions of the first sub-cube in the first layer is at least 12000 (i.e., 120 / 0.01). Similarly, based on the precision of the second layer being decimeters, the number of divisions of the first sub-cube in the second layer is at least 120.

[0099] Figure 3 This is a schematic diagram of a second sub-cube partitioning provided in this specification. Figure 3 Showing a portion of the cube surrounding the point cloud data. Figure 3 The sub-cube referred to as "first layer" in the text represents the first sub-cube of the first layer, and the remaining 8 sub-cubes represent the first sub-cubes of the second layer. From the above, it can be seen that the precision of the first layer is higher than that of the second layer. Therefore, Figure 3 In the process, the first sub-cube of the first layer was divided into more parts using a larger number of divisions, while the first sub-cube in the upper right corner of the second layer was divided into fewer parts using a smaller number of divisions. Of course,Figure 3 This is just an example; in actual applications, the specific number of divisions can be determined based on the specific circumstances. Also, for ease of description, Figure 3 The diagram only shows the division of the first sub-cube of the first layer and the first sub-cube of the upper right corner of the second layer, omitting the division of the remaining first sub-cubes.

[0100] S104: Determine each first identifier corresponding to each first sub-cube and each second identifier corresponding to each second sub-cube according to the preset order of traversing the three-dimensional space.

[0101] After determining the first sub-cubes corresponding to each layer and the second sub-cubes corresponding to each first sub-cube, the autonomous driving device can assign a unique identifier to each first sub-cube for all first sub-cubes, and assign a unique identifier to each second sub-cube for all second sub-cubes contained in its first sub-cube, according to preset rules. This identifier can then represent the spatial location information of the first or second sub-cube within the cube containing the point cloud data. Therefore, each identifier can be used to represent the coordinates of each 3D point in the point cloud data to complete the compression of the point cloud data.

[0102] Specifically, in one or more embodiments of this specification, the autonomous driving device can determine the first identifiers corresponding to each first sub-cube and the second identifiers corresponding to each second sub-cube according to a preset order of traversing three-dimensional space. The specific order of traversing three-dimensional space is not limited in this specification; the first and second identifiers can refer to the traversal order. For example, the first and second sub-cubes can be traversed from left to right, from front to back, or from top to bottom, and the traversal order can be used as the corresponding identifiers. Figure 4 As shown.

[0103] Figure 4 This is a schematic diagram of a three-dimensional spatial traversal order provided in this specification. Figure 4 The largest cube in the diagram is the cube that encloses the point cloud data. For ease of description, Figure 4 Only the top 9 first sub-cubes of the second layer are shown as an example; the first sub-cubes below the top are omitted. The actual cube contains 27 first sub-cubes. The numbers on the top 9 first sub-cubes represent the first identifiers after traversal. Based on the distribution of these first identifiers, the traversal order starts from the bottom left corner of the top, proceeds from left to right, from front to back, and ends at the top right corner. The traversal also includes traversing the omitted first sub-cubes below the top, following the same traversal method; that is, the overall traversal is from top to bottom.

[0104] When the unmanned vehicle traverses the second sub-cubes in each first sub-cube, it can traverse in the order in which the first sub-cubes are traversed, or it can traverse in other orders. The specific process is similar to that of traversing the first sub-cubes, and will not be described in detail here.

[0105] S106: Based on the coordinates of each three-dimensional point in the point cloud data, the side length of the cube, and the number of layers, determine the first sub-cube into which each three-dimensional point falls and the first identifier.

[0106] S108: Based on the coordinates of each three-dimensional point, the first sub-cube into which each three-dimensional point falls, the side length of the cube, and the preset precision of each layer, determine the second sub-cube into which each three-dimensional point falls and the second identifier.

[0107] After determining the identifiers of each first sub-cube and each second sub-cube as described above, the autonomous driving device can further determine the first sub-cube into which each 3D point in the point cloud data falls, and the second sub-cube into which it falls, so that the position information of the 3D point can be represented by the corresponding identifier.

[0108] Therefore, the autonomous driving device can first determine the first sub-cube and the first identifier that each three-dimensional point falls into based on the coordinates of each three-dimensional point in the point cloud data, the side length of the cube, and the preset number of layers.

[0109] Specifically, in one or more embodiments of this specification, firstly, the unmanned driving device can determine the coordinates of each three-dimensional point after coordinate transformation based on the coordinate system of the cube, according to the coordinates of each three-dimensional point in the point cloud data and the side length of the cube.

[0110] Then, based on the side length of the cube and the preset number of layers, the side length of the first sub-cube is determined.

[0111] Then, based on the transformed coordinates of each 3D point and the side length of the first sub-cube, the first sub-cube into which each 3D point falls is determined, so as to determine the first identifier corresponding to the 3D point.

[0112] In this point cloud data, the coordinates of each 3D point can be the relative position coordinates with the sensor as the origin. Assuming the sensor's acquisition radius is *s* meters, the range of values ​​for each 3D point in each dimension is [-s, s]. The coordinate system of the cube can be the first quadrant of a 3D coordinate system, such as... Figure 5 As shown.

[0113] Figure 5This is a coordinate transformation diagram provided in this specification. The coordinates of each three-dimensional point in the origin cloud data are relative to the sensor, i.e., the center of the cube, as the origin. If the cube is placed in the first quadrant of the three-dimensional coordinate system, each dimension of each three-dimensional point should be added with s. In other words, the value range of each three-dimensional point in each dimension is converted to [0, 2s].

[0114] The first sub-cube into which the 3D point falls and the first identifier can be calculated using the following formula:

[0115]

[0116] In the formula, L1 represents the first identifier corresponding to the 3D point with coordinates (x, y, z), and n represents the number of divisions when dividing the cube into voxels from the center outwards according to a preset number of layers to determine the first sub-cube corresponding to each layer. When the number of layers is m, n = 2m-1. That is, when the cube is divided into m layers from the center outwards, the cube is also divided into 2m-1 parts in each dimension. 2s represents the side length of the cube. This represents the side length of each first sub-cube obtained by partitioning.

[0117] Taking the z-axis dimension as an example, z+s represents the z-axis coordinate of the 3D point based on the cube after coordinate transformation, and the ratio of the transformed coordinate value to the side length of the first sub-cube (i.e., This gives us the number of parts of the cube into which the 3D point falls in the first sub-cube along the z-axis. This indicates rounding down the number of parts, because the division of the first sub-cube starts from zero, so the final number of parts is reduced by one. The calculation for the other two dimensions is similar, and will not be elaborated here. Once we know the number of parts of the first sub-cube into which the point falls in each dimension, we can determine the first sub-cube into which the point falls. The multiplier after the number of parts for each dimension (i.e., n) 2 The encoding rules corresponding to the order of traversing the three-dimensional space are represented by the sum of the products (n, 1) and the product summation. All of these are specified in this specification. All of these represent rounding down; further explanation will not follow.

[0118] For example, Figure 5 In the example of a three-dimensional point with coordinates (s, s, 0) and a layer number of 2, after substituting the values, we can see that the first sub-cube into which the three-dimensional point falls is the second part in both the x-axis and y-axis directions of the cube, and the 0th part in the z-axis direction (that is, the first sub-cube identified by the number 8). Figure 5The numbers on the nine first sub-cubes at the bottom center represent the first identifier determined after traversal, specifically, traversing the x-axis first, then the y-axis, and finally the z-axis. For ease of description, Figure 5 The first sub-cubes above the bottom are omitted. Based on the encoding rules corresponding to this traversal order, the first identifier for this 3D point is calculated to be 8.

[0119] After the unmanned driving device determines the first sub-cube and the first marker into which each three-dimensional point falls, it can then determine the second sub-cube and the second marker into which each three-dimensional point falls within the first sub-cube based on the coordinates of each three-dimensional point, the first sub-cube into which each three-dimensional point falls, the side length of the cube, and the preset precision of each layer.

[0120] Specifically, in one or more embodiments of this specification, firstly, the autonomous driving device can determine the coordinates of each three-dimensional point after coordinate transformation based on the coordinate system of the first sub-cube, according to the coordinates of each three-dimensional point and the first sub-cube into which each three-dimensional point falls.

[0121] Then, for the coordinates of each 3D point, the side length of the second sub-cube corresponding to the first sub-cube is determined based on the first sub-cube into which the 3D point falls, the preset precision of the layer where the first sub-cube is located, and the side length of the cube.

[0122] Finally, based on the transformed coordinates of the 3D point and the side length of the second sub-cube, the second sub-cube into which the 3D point falls within the first sub-cube is determined, thereby identifying the second identifier corresponding to the 3D point.

[0123] Figure 6 This is another coordinate transformation diagram provided in this specification. The coordinates of each 3D point in the original point cloud data are relative to the sensor, i.e., the center of the cube, as the origin. If the first sub-cube into which the point cloud data falls is placed in the first quadrant of the 3D coordinate system, then each dimension of each 3D point should be increased by 's' and decreased by the minimum boundary value of each dimension of the first sub-cube. In other words, the value range of each 3D point in each dimension is transformed into...

[0124] The second sub-cube into which the 3D point falls and the second identifier can be calculated using the following formula:

[0125]

[0126]

[0127]

[0128] L2=l1 +l 2 +l 3

[0129] In the formula, L2 represents the second identifier corresponding to the 3D point with coordinates (x, y, z), n represents the number of divisions when dividing the cube into voxels from the center outwards according to the preset number of layers to determine the first sub-cube corresponding to each layer. 2s represents the side length of the cube, and p represents the preset precision of the layer in which the 3D point falls into the first sub-cube. This represents the side length of the first sub-cube. This represents the number of voxel divisions used to determine the corresponding second sub-cube when dividing the first sub-cube into voxels. This represents the side length of the second sub-cube into which the 3D point falls within the first sub-cube it falls into.

[0130] Taking the dimension along the x-axis as an example, This represents the x-axis coordinate of the 3D point after coordinate transformation based on the coordinate system of the first sub-cube, where, This represents the minimum boundary value of the first sub-cube into which the 3D point falls. It is the ratio of the transformed coordinates to the side length of the second sub-cube (i.e., ...). This allows us to obtain, along the x-axis, the number of parts of the second sub-cube that the 3D point falls into within the first sub-cube that it falls into within the first sub-cube. This indicates rounding down the number of parts, because the number of parts is divided starting from zero when dividing the second sub-cube, so the final number of parts is reduced by one. The calculation for the other two dimensions is similar, and will not be elaborated here. Once we know the number of parts of the second sub-cube that the 3D point falls into in the first sub-cube in each dimension, we can determine the second sub-cube into which the 3D point falls. The multiplier after the number of parts for each dimension (i.e., 1, ...) The sum of the final products represents the encoding rules corresponding to the order of traversing the three-dimensional space.

[0131] For example, Figure 6 In the example, a three-dimensional point with coordinates (s, s, 0) is used, with 2 layers and a precision of [missing information]. When the value is 1, after substituting it into the equation, we can see that the first sub-cube into which the three-dimensional point falls is the second part in both the x-axis and y-axis directions of the cube, and the 0th part in the z-axis direction (that is, the second sub-cube identified by the number 8). Figure 6 The numbers on the nine second sub-cubes at the bottom center represent the second identifier determined after traversal, specifically, traversing the x-axis first, then the y-axis, and finally the z-axis. For ease of description, Figure 6The second sub-cubes above the bottom are omitted. Based on the encoding rules corresponding to this traversal order, the second identifier for this 3D point is calculated to be 8.

[0132] Of course, the examples above are only for ease of description. In practical applications, higher precision can be determined according to business needs. Furthermore, this specification does not limit the calculation methods for the first and second identifiers. In other words, the method for calculating the identifiers can be adjusted according to the specific order of traversing the three-dimensional space; examples will not be provided here.

[0133] S110: Based on the first identifier and the second identifier corresponding to each three-dimensional point, determine the compressed data corresponding to each three-dimensional point and store it.

[0134] Based on the first and second identifiers corresponding to each three-dimensional point, the autonomous driving device can determine the spatial coordinates of each three-dimensional point based on the spatial positions of each first and second sub-cube corresponding to each identifier. Therefore, it can determine and store the compressed data corresponding to each three-dimensional point based on the first and second identifiers.

[0135] In one or more embodiments of this specification, specifically, for each three-dimensional point, the autonomous driving device can determine the compressed data of the three-dimensional point based on the first identifier and the second identifier corresponding to the three-dimensional point. Furthermore, based on the stored compressed data, it determines whether the compressed data of the three-dimensional point is consistent with the stored compressed data. If it is consistent, the compressed data of the three-dimensional point is not stored; otherwise, the compressed data of the three-dimensional point is stored.

[0136] The compressed data can refer to the identifier pair consisting of a first identifier and a second identifier corresponding to the 3D point, for example, (first identifier, second identifier). Furthermore, since multiple points may reside within the same second sub-cube during the division of the first and second sub-cubes, these points will receive the same first and second identifiers during rounding. Therefore, to save space and improve the compression ratio, only one instance of the data corresponding to these points needs to be stored. Specifically, during storage, it can be determined whether the compressed data of the 3D point is the same as the already stored compressed data. If no identical compressed data exists, the binary code corresponding to the compressed data is stored using a preset number of bytes. The preset number of bytes can be determined based on business requirements. For example, for data near the center of the proximity sensor, when higher accuracy is required, the binary code of the compressed data will increase accordingly, thus requiring a larger number of bytes to store the compressed data. For data near the acquisition radius of the proximity sensor, when lower accuracy is required, the binary code of the compressed data will decrease accordingly, thus requiring a smaller number of bytes to store the compressed data.

[0137] For example, when the preset number of layers is 2, starting from the center of the cube and moving outwards, if the accuracy of the first layer needs to reach millimeters, 5 or 6 bytes can be used to store the identifier pair. If the accuracy of the second layer needs to reach decimeters, 4 bytes can be used to store the identifier pair.

[0138] based on Figure 1 The point cloud data compression method shown first divides the cube surrounding the point cloud data into voxels from the center outwards to determine the first sub-cube for each layer, based on the cube surrounding the point cloud data and a preset number of layers. Then, according to a preset precision for each layer, voxels are further divided into second sub-cubes for each first sub-cube. Next, according to a preset traversal order, a first identifier corresponding to each first sub-cube and a second identifier corresponding to each second sub-cube are determined. This allows for the determination of the first and second identifiers for each 3D point based on the first sub-cube it falls into and the second sub-cube within that first sub-cube, thus determining the compressed data for each 3D point. Since the cube, number of layers, and precision can be predetermined, the compressed data can be directly determined based on the coordinates of each 3D point during actual compression, reducing the space complexity of the algorithm and improving compression efficiency.

[0139] Furthermore, in one or more embodiments of this specification, when determining the number of divisions for each first sub-cube corresponding to each layer in step S102, it can also be determined based on the preset precision of each layer and the preset number of bytes used to store compressed data. For example, taking a cube with a side length of 360 meters, 2 layers, a second layer precision of decimeters, and a preset number of bytes of 4 bytes as an example, it can be known that the side length of the first cube is 120 meters, and the number of divisions for the first sub-cube of the second layer is at least 120. Since the number of layers m is 2, the number of divisions for the cube is n = 2m - 1 = 3. When the cube is divided into voxels from the center outwards, 27 first sub-cubes of the same size will be obtained. The value range of the first identifier is [0, 26], and it occupies 5 bytes (i.e., ...) during storage. If 4 bytes are used, then 27 bits remain. Therefore, a maximum of 512 bits can be used to store the second identifier corresponding to each second sub-cube. A division of 512 bits satisfies the precision requirement and makes full use of storage space. Therefore, it can be determined that the division number of each first sub-cube corresponding to the second layer is 512.

[0140] Furthermore, in one or more embodiments of this specification, in step S104, when determining the first identifiers corresponding to each first sub-cube and the second identifiers corresponding to each second sub-cube, the autonomous driving device may first determine the traversal rows composed of each sub-cube and the traversal order of each traversal row according to a preset order of traversing the three-dimensional space. Then, by traversing each traversal row sequentially according to the traversal order and determining the identifiers corresponding to the sub-cubes in a single traversal row according to the row direction order, the first identifiers corresponding to each first sub-cube and the second identifiers corresponding to all second sub-cubes contained in the first sub-cube containing the first sub-cube containing the second sub-cube are determined for each second sub-cube.

[0141] This specification does not restrict the order of traversing the three-dimensional space. Taking the coordinate axes of a three-dimensional coordinate system as an example, the traversal rows formed by each sub-cube can be determined according to the order from the x-axis to the y-axis and then to the z-axis. Using the above order as an example, a traversal row here refers to a row composed of all sub-cubes whose center points lie on a straight line that is parallel to the x-axis. The traversal order of each row can be determined according to the traversal order along the y-axis and z-axis. The row direction order can be from the negative to the positive x-axis or from the positive to the negative x-axis; this specification does not restrict this.

[0142] For example, with Figure 4 Taking the example shown, since the x-axis direction is traversed first, the three first sub-cubes labeled "0", "1", and "2" form one traversal row, and the three first sub-cubes labeled "3", "4", and "5" form another traversal row, and so on.

[0143] Figure 4 The traversal order shown is as follows: following the z-axis from negative to positive, first traversing the three traversal rows consisting of the top 9 first sub-cubes. For these three traversal rows, traversing is performed sequentially along the y-axis from negative to positive. That is, first traversing the traversal row consisting of the three first sub-cubes labeled "0", "1", and "2", then traversing the traversal row consisting of the three first sub-cubes labeled "3", "4", and "5", then traversing the traversal row consisting of the three first sub-cubes labeled "6", "7", and "8". Then, traversing each traversal row below the top layer is performed until the labels of all first sub-cubes are determined.

[0144] Figure 4 The rows shown are arranged in order from negative to positive along the x-axis. Of course, when determining the identifier of a sub-cube in a single traversal row for rows other than the first traversal row, the identifier of the last sub-cube in the previous traversal row needs to be continued.

[0145] When the autonomous driving device traverses all the second sub-cubes contained in the first sub-cube, it can traverse them in the order in which the first sub-cubes are traversed, or it can traverse them in other orders. The specific process is similar to that of traversing the first sub-cubes, and will not be described in detail here.

[0146] Furthermore, in one or more embodiments of this specification, in steps S106 and S108, this specification does not limit the calculation method of the first identifier and the second identifier corresponding to each three-dimensional point, and the formula mentioned is only an exemplary formula under a traversal order, which does not constitute a limitation on this specification.

[0147] Furthermore, in one or more embodiments of this specification, in steps S106 and S108, as can be seen from the calculation formulas of the first and second identifiers corresponding to each three-dimensional point, the point cloud data compression method in this specification can directly determine the first and second identifiers corresponding to each three-dimensional point based on the coordinates of each three-dimensional point and other preset quantities. Therefore, each step in steps S100 to S104 can be pre-completed by the autonomous driving device, and the relevant preset quantities can be stored in the storage device. When compressing the point cloud data, the required preset quantities can be directly called to calculate the first and second identifiers corresponding to each three-dimensional point based on the coordinates of each three-dimensional point, thereby determining the compressed data corresponding to each three-dimensional point.

[0148] Furthermore, in one or more embodiments of this specification, when the autonomous driving device stores compressed data corresponding to each 3D point in the point cloud data, it can also store each preset quantity in steps S100 to S104 corresponding to this compression, and send it back to the server along with the compressed data. Of course, due to different business needs, the compressed data corresponding to each 3D point may be determined based on different preset quantities. In this case, a globally unique identifier corresponding to the preset quantity under different conditions can be predetermined, and this unique identifier corresponding to this compression can be sent back along with the compressed data, so that the server can determine which preset quantity the autonomous driving device specifically used to compress the point cloud data based on the unique identifier. The server can also pre-store the relevant preset quantities in a storage device, so that when the server decompresses, it can directly call each preset quantity.

[0149] In addition, in one or more embodiments of this specification, when storing the compressed data of each three-dimensional point in step S110, the autonomous driving device can also determine the preset number of bytes by the following method:

[0150] First, based on the side length and number of layers of the cube, determine the number of the first sub-cubes obtained after voxel partitioning.

[0151] Then, based on the preset precision of the layer where the first sub-cube falls, the side length of the cube, and the number of layers, the number of second sub-cubes obtained after the first sub-cube is divided into voxels is determined.

[0152] Finally, based on the number of the first sub-cubes and the number of the second sub-cubes, the number of bits required to store the compressed data of the three-dimensional point is determined, and the preset number of bytes is further determined.

[0153] For example, assuming a cube with a side length of 120 meters and a preset number of layers of 2, the number of first sub-cubes obtained after voxel partitioning is 9. Correspondingly, the number of bits required to store the first identifier in the compressed data of this 3D point is at least 4 bits. Continuing to assume that, from the center of the cube outwards, the layer where the 3D point falls into the first sub-cube is the first layer, and the preset precision of the first layer is centimeters, the number of partitions corresponding to the first sub-cube is at least 400. Therefore, the number of second sub-cubes obtained after voxel partitioning of the first sub-cube is at least 64,000,000. Correspondingly, the number of bits required to store the second identifier in the compressed data of this 3D point is at least 26 bits. Therefore, the number of bits required to store the compressed data of this 3D point is at least 31 bits, that is, the preset number of bytes is 4 bytes.

[0154] Furthermore, in one or more embodiments of this specification, when the unmanned driving device is an unmanned vehicle or an unmanned boat, in order to improve the compression ratio, the unmanned driving device can determine a cube centered on the sensor and divide the cube into voxels from the center outwards. After determining the first sub-cubes corresponding to each layer, the first sub-cubes below the first sub-cube of the first layer where the sensor is located can be discarded. In other words, in step S104, the unmanned driving device can determine the first identifiers of each first sub-cube starting from the first sub-cubes of the horizontal layer where the first sub-cube of the first layer is located, according to a preset order of traversing the three-dimensional space.

[0155] It should be noted that the above compression methods are all based on unmanned vehicles as an example. However, the foregoing also mentions a variety of possible application scenarios (such as point cloud data being collected by point cloud data acquisition devices on manned vehicles), all of which can be applied to the point cloud data compression methods provided in this manual to improve compression efficiency.

[0156] Figure 7 This is a flowchart illustrating a point cloud data decompression method described in this specification, which specifically includes the following steps:

[0157] S700: Obtain the compressed data corresponding to each 3D point in the stored point cloud data, and determine the preset cube and number of layers surrounding the point cloud data.

[0158] In practical applications, the server can receive compressed data corresponding to the point cloud data transmitted back by the autonomous driving device, and decompress it for use according to specific business needs. In one or more embodiments of this specification, before decompressing the compressed data, the server needs to first obtain the compressed data corresponding to each three-dimensional point in the stored point cloud data, and determine the preset cube surrounding the point cloud data and the number of layers.

[0159] This manual does not restrict the specific method by which the server acquires the compressed data. For example, the server can receive compressed data transmitted back from the autonomous vehicle in real time via wireless communication, and so on. The terms "compressed data," "cube," and "number of layers" can be found in the corresponding descriptions in the decompression method, and will not be repeated here. The preset cube and number of layers surrounding the point cloud data can be transmitted back by the autonomous vehicle along with the compressed data, or they can be pre-stored in the server's storage device and retrieved during decompression. This manual does not restrict these methods.

[0160] The server mentioned in this manual can refer to a server set up on a business platform, or a device such as a desktop computer or laptop computer capable of executing the solutions described in this manual. For ease of explanation, the following description will only focus on the server as the execution subject.

[0161] S702: For each compressed data, determine the first identifier and the second identifier contained in the compressed data.

[0162] For each compressed data obtained above, the server can first determine the first identifier and the second identifier contained in the compressed data, and then determine the spatial location of the corresponding three-dimensional point based on the first identifier and the second identifier. The first identifier and the second identifier can be referred to in the corresponding description in the compression method, and will not be repeated here.

[0163] Specifically, the server can determine the first identifier and the second identifier contained in the compressed data based on the number of bytes and the number of layers. For example, if the compressed data occupies 4 bytes and has 2 layers, it can be known that the first identifier occupies 5 bits. Therefore, the first 5 bits of the compressed data can be used as the first identifier, and the remaining 27 bits can be used as the second identifier.

[0164] S704: Determine the coordinates of the first sub-cube corresponding to the compressed data based on the first identifier, the side length of the cube, and the number of layers.

[0165] S706: Determine the coordinates of the second sub-cube corresponding to the compressed data based on the second identifier, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube.

[0166] S708: Determine the coordinates of the three-dimensional point corresponding to the compressed data based on the coordinates of the first sub-cube and the second sub-cube corresponding to the compressed data.

[0167] Based on the first and second identifiers obtained above, the server can further determine the coordinates of the first sub-cube and the corresponding second sub-cube of the compressed data, so as to determine the coordinates of the three-dimensional point corresponding to the compressed data.

[0168] Therefore, the server can first determine the coordinates of the first sub-cube corresponding to the compressed data based on the side length and number of layers of the cube.

[0169] In one or more embodiments of this specification, specifically, when determining the coordinates of the first sub-cube corresponding to the compressed data, the server can first determine the position of the first sub-cube within the cube based on the first identifier and a preset order of traversing the three-dimensional space. Then, based on the side length of the cube and the number of layers, the side length of the first sub-cube is determined. Finally, based on the position of the first sub-cube corresponding to the compressed data and its side length, the coordinates of the first sub-cube corresponding to the compressed data are determined.

[0170] After the server determines the coordinates of the first sub-cube corresponding to the compressed data, it can then determine the coordinates of the second sub-cube corresponding to the compressed data based on the second identifier, the preset order of traversing the three-dimensional space, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube.

[0171] In one or more embodiments of this specification, specifically, when determining the coordinates of the second sub-cube corresponding to the compressed data, the server can first determine the position of the second sub-cube within the first sub-cube based on the second identifier. Then, based on the preset precision of the layer where the first sub-cube is located, the layer number, and the side length of the cube, the side length of the second sub-cube is determined. Finally, based on the position of the second sub-cube corresponding to the compressed data and the side length of the second sub-cube, the coordinates of the second sub-cube corresponding to the compressed data are determined.

[0172] Once the coordinates of the first sub-cube and the second sub-cube corresponding to the compressed data are determined, the server can determine the coordinates of the three-dimensional point corresponding to the compressed data based on the coordinates of the first sub-cube and the second sub-cube.

[0173] The coordinates corresponding to the compressed data can be calculated using the following formula:

[0174]

[0175]

[0176]

[0177] In the formula, x, y, and z represent the coordinate values ​​of each dimension obtained after decompressing the compressed data. Taking the x-axis as an example, d represents the first identifier, and n represents the number of divisions when dividing the cube into voxels from the center outwards according to the preset number of layers to determine the first sub-cube corresponding to each layer. 2s represents the side length of the cube. Therefore, in the first term, d%n represents the number of divisions of the first sub-cube corresponding to the first identifier within the cube, that is, the position of the first sub-cube within the cube in the x-axis direction. This represents the side length of each first sub-cube obtained by the division. As described in steps S106 and S108, a subtraction of 1 was performed when calculating the number of parts. Therefore, the product of the number of parts and the side length of the first sub-cube actually represents the minimum boundary value of the first sub-cube corresponding to the compressed data in the x-axis direction.

[0178] In the second item, 'e' represents the second identifier, and 'p' represents the preset precision of the layer where the first sub-cube corresponding to the compressed data is located. As described in steps S106 and S108, This represents the number of voxel divisions used to determine the corresponding second subcube when dividing the first subcube into voxels. e% This indicates the number of parts of the second sub-cube corresponding to the second identifier within the first sub-cube, that is, the position of the second sub-cube within the first sub-cube in the x-axis direction. Let the side length of the first sub-cube be denoted as . This represents the side length of the second sub-cube into which the 3D point falls within the first sub-cube. As described in steps S106 and S108, a subtraction of 1 was performed when calculating the number of parts. Therefore, the product of the number of parts and the side length of the second sub-cube actually represents the minimum boundary value of the second sub-cube corresponding to the compressed data in the x-axis direction.

[0179] Finally, the minimum boundary value of the first sub-cube in the x-axis direction corresponding to the compressed data is added to the minimum boundary value of the second sub-cube in the x-axis direction to obtain the x-axis coordinate value of the three-dimensional point corresponding to the compressed data based on the coordinate system of the cube. In the third term, subtracting s indicates coordinate transformation, that is, converting to point cloud data for the sensor, that is, the coordinates in the coordinate system with the center of the cube as the origin.

[0180] The calculation of coordinates along the y-axis and z-axis is similar to the above and will not be repeated here. Alternatively, one can first calculate the minimum boundary values ​​of the first sub-cube corresponding to the compressed data along the x-axis, y-axis, and z-axis, and then construct the minimum boundary coordinates of the first sub-cube in each dimension. Next, calculate the minimum boundary values ​​of the second sub-cube corresponding to the compressed data along the x-axis, y-axis, and z-axis, and construct the minimum boundary coordinates of the second sub-cube in each dimension. Finally, add the coordinates of the first and second sub-cubes together, and subtract 's' in each dimension to perform coordinate transformation, obtaining the coordinates of the 3D point corresponding to the compressed data. This specification does not limit the method of calculating the coordinates of the 3D point corresponding to the compressed data; the formulas given are merely exemplary formulas and do not constitute a limitation of this specification.

[0181] Furthermore, in one or more embodiments of this specification, the coordinates of each 3D point in the point cloud data are relative position coordinates with the sensor as the origin. Therefore, in practical applications, the geographic coordinates of the sensor corresponding to each frame of point cloud data can be stored accordingly, and the geographic coordinates of the corresponding sensor can be sent along with the compressed data corresponding to that frame of point cloud data. Then, when the server decompresses the data, it can determine the actual geographic coordinates of each 3D point based on the geographic coordinates of the corresponding sensor after obtaining the relative coordinates of each 3D point corresponding to each compressed data, and apply this in practice.

[0182] It should be noted that the above decompression instructions are all based on the server as the executing entity, but this manual does not restrict the executing entity for the decompression method. The executing entity for the decompression can also be other devices capable of executing the decompression scheme, etc., and this manual does not impose any restrictions.

[0183] This manual also provides corresponding point cloud data compression devices, such as... Figure 8 As shown.

[0184] Figure 8 This specification provides a schematic diagram of a point cloud data compression device, which includes:

[0185] Acquisition module 800 is used to acquire point cloud data and determine a cube surrounding the point cloud data;

[0186] The partitioning module 802 is used to partition the cube from the center outward according to a preset number of layers, determine each first sub-cube corresponding to each layer, and partition each first sub-cube corresponding to each layer according to a preset precision of each layer, determine each second sub-cube corresponding to each first sub-cube.

[0187] The traversal module 804 is used to determine each first identifier corresponding to each first sub-cube and each second identifier corresponding to each second sub-cube according to a preset traversal order of the three-dimensional space.

[0188] The first identifier determination module 806 is used to determine the first sub-cube and the first identifier that each three-dimensional point falls into based on the coordinates of each three-dimensional point in the point cloud data, the side length of the cube, and the number of layers.

[0189] The second identifier determination module 808 is used to determine the second sub-cube and the second identifier of each three-dimensional point based on the coordinates of each three-dimensional point, the first sub-cube into which each three-dimensional point falls, the side length of the cube, and the preset precision of each layer.

[0190] The compression module 810 is used to determine and store the compressed data corresponding to each three-dimensional point based on the first identifier and the second identifier corresponding to each three-dimensional point.

[0191] Optionally, the partitioning module 802 determines the number of partitions for each first sub-cube corresponding to each layer based on the preset precision of each layer, performs voxel partitioning on each first sub-cube corresponding to each layer based on the number of partitions for each layer, and determines each second sub-cube corresponding to each first sub-cube, wherein the closer to the center of the cube, the higher the preset precision.

[0192] Optionally, the traversal module 804 determines each traversal row composed of each sub-cube and the traversal order of each traversal row according to a preset traversal order of the three-dimensional space, so as to traverse each traversal row sequentially according to the traversal order, and determine the identifier corresponding to the sub-cube in a single traversal row according to the row direction order, thereby determining each first identifier corresponding to each first sub-cube and determining each second identifier corresponding to each second sub-cube.

[0193] Optionally, the first identifier determination module 806 determines the coordinates of each three-dimensional point after coordinate transformation based on the coordinate system of the cube, according to the coordinates of each three-dimensional point in the point cloud data and the side length of the cube; determines the side length of the first sub-cube according to the side length of the cube and the number of layers; and determines the first sub-cube into which each three-dimensional point falls according to the transformed coordinates of each three-dimensional point and the side length of the first sub-cube.

[0194] Optionally, the second identifier determination module 808 determines the coordinates of each three-dimensional point after coordinate transformation based on the coordinate system of the first sub-cube, according to the coordinates of each three-dimensional point and the first sub-cube into which each three-dimensional point falls. For the coordinates of each three-dimensional point, the side length of the second sub-cube corresponding to the first sub-cube is determined according to the first sub-cube into which the three-dimensional point falls, the preset precision of the layer where the first sub-cube is located, and the side length of the cube. The second sub-cube into which the three-dimensional point falls is determined according to the transformed coordinates of the three-dimensional point and the side length of the second sub-cube.

[0195] Optionally, the compression module 810, for each three-dimensional point, determines the compressed data of the three-dimensional point according to the first identifier and the second identifier corresponding to the three-dimensional point, and determines whether the compressed data of the three-dimensional point is consistent with the stored compressed data according to the stored compressed data. If it is consistent, the compressed data of the three-dimensional point is not stored; otherwise, the compressed data of the three-dimensional point is stored.

[0196] This manual also provides corresponding point cloud data decompression devices, such as... Figure 9 As shown.

[0197] Figure 9 This specification provides a schematic diagram of a point cloud data decompression device, which includes:

[0198] The acquisition module 900 is used to acquire the compressed data corresponding to each three-dimensional point in the stored point cloud data, and to determine the preset cube and number of layers surrounding the point cloud data.

[0199] The identifier determination module 902 is used to determine, for each compressed data, a first identifier and a second identifier contained in the compressed data;

[0200] The first coordinate determination module 904 is used to determine the coordinates of the first sub-cube corresponding to the compressed data based on the first identifier, the side length of the cube, and the number of layers.

[0201] The second coordinate determination module 906 is used to determine the coordinates of the second sub-cube corresponding to the compressed data based on the second identifier, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube.

[0202] The decompression module 908 is used to determine the coordinates of the three-dimensional point corresponding to the compressed data based on the coordinates of the first sub-cube and the second sub-cube corresponding to the compressed data.

[0203] Optionally, the first coordinate determination module 904 determines the position of the first sub-cube corresponding to the compressed data within the cube based on the first identifier and a preset order of traversing the three-dimensional space, determines the side length of the first sub-cube based on the side length of the cube and the number of layers, and determines the coordinates of the first sub-cube corresponding to the compressed data based on the position of the first sub-cube corresponding to the compressed data and the side length of the first sub-cube.

[0204] Optionally, the second coordinate determination module 906 determines the position of the second sub-cube corresponding to the compressed data within the first sub-cube based on the second identifier and a preset order of traversing the three-dimensional space; determines the side length of the second sub-cube based on the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube; and determines the coordinates of the second sub-cube corresponding to the compressed data based on the position of the second sub-cube corresponding to the compressed data and the side length of the second sub-cube.

[0205] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The provided point cloud data compression method or execution method Figure 7 The provided method for decompressing point cloud data.

[0206] This instruction manual also provides Figure 10 The diagram shows the structure of the electronic device. Figure 10 At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The provided point cloud data compression method or execution method Figure 7 The provided method for decompressing point cloud data.

[0207] Of course, in addition to the software implementation method, this specification does not exclude other implementation methods, such as the combination of hardware and software XOR logic devices, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0208] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0209] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0210] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0211] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware.

[0212] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0213] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0214] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0215] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0216] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0217] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0218] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0219] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0220] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0221] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0222] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0223] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A point cloud data compression method, characterized in that, include: Acquire point cloud data and determine the cube that surrounds the point cloud data; Based on the preset number of layers, the cube is divided into voxels from the center outward to determine each first sub-cube corresponding to each layer. Based on the preset precision of each layer, each first sub-cube corresponding to each layer is divided into voxels to determine each second sub-cube corresponding to each first sub-cube. Based on the preset order of traversing the three-dimensional space, determine each first identifier corresponding to each first sub-cube and each second identifier corresponding to each second sub-cube; Based on the coordinates of each 3D point in the point cloud data, the side length of the cube, and the number of layers, the first sub-cube and the first identifier that each 3D point falls into are determined respectively. Based on the coordinates of each three-dimensional point, the first sub-cube into which each three-dimensional point falls, the side length of the cube, and the preset precision of each layer, the second sub-cube into which each three-dimensional point falls and the second identifier are determined respectively. Based on the first and second identifiers corresponding to each three-dimensional point, the compressed data corresponding to each three-dimensional point is determined and stored.

2. The method as described in claim 1, characterized in that, Based on the preset precision of each layer, voxel division is performed on each first sub-cube corresponding to each layer to determine each second sub-cube corresponding to each first sub-cube, specifically including: Based on the preset precision of each layer, determine the number of divisions for each first sub-cube corresponding to each layer; Based on the number of divisions corresponding to each layer, the first sub-cubes corresponding to each layer are divided into voxels to determine the second sub-cubes corresponding to each first sub-cube. The closer to the center of the cube, the higher the preset accuracy.

3. The method as described in claim 1, characterized in that, Based on a preset order of traversing the three-dimensional space, determine each first identifier corresponding to each first sub-cube and each second identifier corresponding to each second sub-cube, specifically including: Based on the preset order of traversing the three-dimensional space, determine each traversal row composed of each sub-cube and the traversal order of each traversal row; The method involves sequentially traversing each traversal row according to the traversal order and determining the identifier corresponding to the sub-cube in a single traversal row according to the row direction order, thereby determining each first identifier corresponding to each first sub-cube and each second identifier corresponding to each second sub-cube.

4. The method as described in claim 1, characterized in that, Based on the coordinates of each 3D point in the point cloud data, the side length of the cube, and the number of layers, the first sub-cube into which each 3D point falls is determined, specifically including: Based on the coordinates of each 3D point in the point cloud data and the side length of the cube, determine the coordinates of each 3D point after coordinate transformation based on the coordinate system of the cube; The side length of the first sub-cube is determined based on the side length of the cube and the number of layers. Based on the transformed coordinates of each three-dimensional point and the side length of the first sub-cube, the first sub-cube into which each three-dimensional point falls is determined.

5. The method as described in claim 1, characterized in that, Based on the coordinates of each 3D point, the first sub-cube into which each 3D point falls, the side length of the cube, and the preset precision of each layer, the second sub-cube into which each 3D point falls is determined, specifically including: Based on the coordinates of each three-dimensional point and the first sub-cube into which each three-dimensional point falls, determine the coordinates of each three-dimensional point after coordinate transformation based on the coordinate system of the first sub-cube; For the coordinates of each 3D point, the side length of the second sub-cube corresponding to the first sub-cube is determined based on the first sub-cube into which the 3D point falls, the preset precision of the layer where the first sub-cube is located, and the side length of the cube. Based on the transformed coordinates of the 3D point and the side length of the second sub-cube, determine the second sub-cube into which the 3D point falls within the first sub-cube it falls into.

6. The method as described in claim 1, characterized in that, Based on the first identifier and the second identifier corresponding to each three-dimensional point, the compressed data corresponding to each three-dimensional point is determined, specifically including: For each 3D point, the compressed data of the 3D point is determined based on the first identifier and the second identifier corresponding to the 3D point; Based on the stored compressed data, determine whether the compressed data of the three-dimensional point is consistent with the stored compressed data; If so, then the compressed data for that 3D point will not be stored; If not, then store the compressed data of that 3D point.

7. A method for decompressing point cloud data, characterized in that, include: The compressed data corresponding to each three-dimensional point in the stored point cloud data is obtained, and the preset cube and number of layers surrounding the point cloud data are determined. The compressed data is obtained by the point cloud data compression method described in claims 1-6. For each compressed data, determine the first identifier and the second identifier contained in the compressed data; Based on the first identifier, the side length of the cube, and the number of layers, determine the coordinates of the first sub-cube corresponding to the compressed data; Based on the second identifier, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube, the coordinates of the second sub-cube corresponding to the compressed data are determined; Based on the coordinates of the first sub-cube and the second sub-cube corresponding to the compressed data, the coordinates of the three-dimensional point corresponding to the compressed data are determined.

8. The method as described in claim 7, characterized in that, Based on the first identifier, the side length of the cube, and the number of layers, the coordinates of the first sub-cube corresponding to the compressed data are determined, specifically including: Based on the first identifier and the preset order of traversing the three-dimensional space, determine the position of the first sub-cube corresponding to the compressed data within the cube; The side length of the first sub-cube is determined based on the side length of the cube and the number of layers. The coordinates of the first sub-cube corresponding to the compressed data are determined based on the position of the first sub-cube and the side length of the first sub-cube.

9. The method as described in claim 7, characterized in that, Based on the second identifier, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube, the coordinates of the second sub-cube corresponding to the compressed data are determined, specifically including: Based on the second identifier and the preset order of traversing the three-dimensional space, determine the position of the second sub-cube corresponding to the compressed data within the first sub-cube; The side length of the second sub-cube is determined based on the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube. The coordinates of the second sub-cube corresponding to the compressed data are determined based on the position of the second sub-cube and the side length of the second sub-cube.

10. A point cloud data compression device, characterized in that, include: The acquisition module is used to acquire point cloud data and determine the cube surrounding the point cloud data; The partitioning module is used to partition the cube from the center outwards according to a preset number of layers, determine the first sub-cube corresponding to each layer, and partition each first sub-cube corresponding to each layer according to a preset precision, and determine each second sub-cube corresponding to each first sub-cube. The traversal module is used to determine the first identifier corresponding to each first sub-cube and the second identifier corresponding to each second sub-cube according to the preset traversal order of the three-dimensional space. The first identifier determination module is used to determine the first sub-cube and the first identifier that each three-dimensional point falls into based on the coordinates of each three-dimensional point in the point cloud data, the side length of the cube, and the number of layers. The second identifier determination module is used to determine the second sub-cube and the second identifier of each three-dimensional point based on the coordinates of each three-dimensional point, the first sub-cube into which each three-dimensional point falls, the side length of the cube, and the preset precision of each layer. The compression module is used to determine and store the compressed data corresponding to each three-dimensional point based on the first identifier and the second identifier corresponding to each three-dimensional point.

11. A point cloud data decompression device, characterized in that, include: The acquisition module is used to acquire compressed data corresponding to each three-dimensional point in the stored point cloud data, and to determine the preset cube and number of layers surrounding the point cloud data, wherein the compressed data is obtained by the point cloud data compression method described in claims 1-6. The identifier determination module is used to determine, for each compressed data, a first identifier and a second identifier contained in the compressed data; The first coordinate determination module is used to determine the coordinates of the first sub-cube corresponding to the compressed data based on the first identifier, the side length of the cube, and the number of layers. The second coordinate determination module is used to determine the coordinates of the second sub-cube corresponding to the compressed data based on the second identifier, the preset precision of the layer where the first sub-cube is located, the number of layers, and the side length of the cube. The decompression module is used to determine the coordinates of the three-dimensional point corresponding to the compressed data based on the coordinates of the first sub-cube and the second sub-cube corresponding to the compressed data.

12. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 6 or 7 to 9.

13. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in any one of claims 1 to 6 or 7 to 9.

Citation Information

Patent Citations

  • Data source generation method based on volume scanning three-dimensional display system

    CN104902255A

  • Path planning method for non-continuous grid division three-dimensional point cloud

    CN108422670A