Method and device for compressing point cloud data
By blocking and spatially enclosing box conversion and compression processing of point cloud data in open-pit mine operation scenarios, the problem of low efficiency of high-precision point cloud data transmission is solved, and efficient data storage and transmission is achieved.
Patent Information
- Application Number
- CN202411570672.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-07
AI Technical Summary
In open-pit mine operation scenarios, the transmission of high-precision centimeter-level point cloud data faces problems such as large data volume, long transmission time, network congestion, and data loss or delay, which affects the security and efficiency of real-time operations.
By collecting point cloud data from mining operation scenarios, chunking them according to the preset span threshold, determining the point cloud space enclosure box for each data block, and converting the point cloud data from absolute coordinate space to relative coordinate space, and finally compressing the target three-dimensional coordinates to obtain the compressed point cloud data.
On the premise of ensuring data accuracy, the storage space and network transmission bandwidth requirements of point cloud data are significantly reduced, data transmission speed and stability are improved, storage costs are reduced, and the problem of poor data compression effect in traditional methods is solved.
Smart Images

Figure CN119579705A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for compressing point cloud data. Background Art
[0002] In open-pit mine operations, due to the geographical dispersion and network conditions (such as incomplete signal coverage, limited bandwidth, etc.), the transmission of massive high-precision terrain point cloud data faces serious challenges. The huge amount of data not only increases the transmission time, but also may cause data loss or delay due to network congestion or instability, affecting the real-time and safety of the operation. Through data compression, the number of transmission bytes of point cloud data can be reduced, the data transmission speed and stability can be improved, and the smooth progress of real-time operations can be ensured. However, due to the high frequency and rapid change of terrain in open-pit mine operation scenes, the centimeter-level high-precision point cloud data and terrain data generated are one of the most important layers of open-pit mine high-precision maps. For point cloud and terrain data with centimeter-level accuracy, it is crucial to compress data while ensuring accuracy and reduce the requirements for network transmission bandwidth and data storage space. While traditional data compression methods have a good compression effect on image data, they are not ideal for centimeter-level point clouds and high-precision terrain data generated by terrain changes in open-pit mine operation scenes. There are technical problems such as high data storage costs and poor data transmission efficiency.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method and device for compressing point cloud data, so as to at least solve the technical problems of high data storage cost and poor data transmission efficiency caused by poor data compression effect.
[0005] According to one aspect of an embodiment of the present invention, a method for compressing point cloud data is provided. The method includes: collecting point cloud data of a mine operation scene, wherein the point cloud data is used to characterize the terrain of the mine operation scene; dividing the point cloud data into blocks according to a preset span threshold to obtain multiple data blocks, wherein the data block contains a three-dimensional point set, and the three-dimensional point set is used to characterize the terrain of the area corresponding to the data block in the mine operation scene, and the preset span threshold is associated with the terrain complexity and data transmission requirements of the mine operation scene, and the data transmission requirements are used to at least indicate the data transmission bandwidth of the mine operation scene; determining the point cloud space bounding box corresponding to each data block, and determining the minimum coordinate point of each point cloud space bounding box, wherein the point cloud space bounding box is used to characterize the three-dimensional space range of the point cloud data in each data block; based on the minimum coordinate point of each point cloud space bounding box, converting the initial three-dimensional coordinates of the points in each point cloud space bounding box from the absolute coordinate space to the relative coordinate space to obtain the target three-dimensional coordinates; compressing the target three-dimensional coordinates to obtain compressed point cloud data.
[0006] Optionally, the point cloud data is divided into blocks according to a preset span threshold to obtain multiple data blocks, including: establishing a point cloud map of the mining operation scene based on the point cloud data, wherein the point cloud map is used to characterize the terrain structure of the mining operation scene; dividing the point cloud map into multiple virtual grids according to a preset span threshold, wherein the side length of each virtual grid is the same as the preset span threshold; mapping each point in the point cloud data to a corresponding virtual grid based on the position of each point in the point cloud map; integrating the point cloud data mapped to the same virtual grid into one data block to obtain multiple data blocks.
[0007] Optionally, determining the point cloud space bounding box corresponding to each data block includes: traversing the three-dimensional point set in each data block, and recording the initial three-dimensional coordinates of each point in the three-dimensional point set; based on the initial three-dimensional coordinates of each point, determining the maximum coordinate value and minimum coordinate value of each point in the horizontal direction of the three-dimensional space, the maximum coordinate value and minimum coordinate value in the vertical direction, and the maximum coordinate value and minimum coordinate value in the height direction; based on the maximum coordinate value and minimum coordinate value in the horizontal direction, the maximum coordinate value and minimum coordinate value in the vertical direction, and the maximum coordinate value and minimum coordinate value in the height direction of each point in each three-dimensional point set in the three-dimensional space, determining the size information of the point cloud space bounding box corresponding to each data block, wherein the size information is used to characterize the length, width and height of the point cloud space bounding box; based on the size information of each point cloud space bounding box, constructing the point cloud space bounding box corresponding to each data block.
[0008] Optionally, determining the minimum coordinate point of each point cloud space bounding box includes: determining the minimum coordinate value in the horizontal direction, the minimum coordinate value in the vertical direction, and the minimum coordinate value in the height direction of the point in the point cloud space bounding box based on the initial three-dimensional coordinates of each point in each point cloud space bounding box; and determining the point corresponding to the minimum coordinate value in the horizontal direction, the minimum coordinate value in the vertical direction, and the minimum coordinate value in the height direction as the minimum coordinate point of the point cloud space bounding box.
[0009] Optionally, based on the minimum coordinate point of each point cloud space bounding box, the initial three-dimensional coordinates of the points in each point cloud space bounding box are converted from the absolute coordinate space to the relative coordinate space to obtain the target three-dimensional coordinates, including: taking the minimum coordinate point corresponding to each point cloud space bounding box as the coordinate origin, and determining the difference between the initial three-dimensional coordinates of each point in each point cloud space bounding box and the three-dimensional coordinates of the coordinate origin; based on the difference, determining the target three-dimensional coordinates of each point in each point cloud space bounding box in the relative coordinate space, wherein the coordinate values in the target three-dimensional coordinates are all non-negative numbers.
[0010] Optionally, the target three-dimensional coordinates are compressed to obtain compressed point cloud data, including: based on the target three-dimensional coordinates of the points in each point cloud space bounding box in the relative coordinate space, a new three-dimensional point set is constructed to obtain multiple new three-dimensional point sets, wherein the target three-dimensional coordinates of the points in the new three-dimensional point set are stored in a floating point type; each point in each new three-dimensional point set is traversed, and the three-dimensional coordinate values of each traversed point are decomposed into an integer part and a decimal part; based on the three-dimensional space range corresponding to each point cloud space bounding box in the mining operation scene, the integer part and the decimal part of the three-dimensional coordinate values of each point in each new three-dimensional point set are encoded to obtain compressed point cloud data.
[0011] Optionally, based on the three-dimensional spatial range corresponding to each point cloud space bounding box in the mining operation scene, the integer part and the decimal part of the three-dimensional coordinate value of each point in each new three-dimensional point set are encoded to obtain compressed point cloud data, including: based on the three-dimensional spatial range corresponding to each point cloud space bounding box in the mining operation scene, determining the encoding type for encoding the integer part of the three-dimensional coordinate value of each point in each new three-dimensional point set, and based on the coordinate accuracy of each point in each point cloud space bounding box, determining the encoding type for encoding the decimal part of the three-dimensional coordinate value of each point in each new three-dimensional point set, wherein the encoding type corresponding to the integer part is the same as the encoding type for encoding the decimal part, and both occupy one byte; based on the encoding type corresponding to the integer part, the integer part of the three-dimensional coordinate value of each point in each point cloud space bounding box is encoded, and based on the encoding type corresponding to the decimal part, the decimal part of the three-dimensional coordinate value of each point in each point cloud space bounding box is encoded.
[0012] Optionally, the point cloud data compression method also includes: marking the integer part of the three-dimensional coordinate value of each point in each point cloud space bounding box as a base value for storage, and marking the first two digits of the decimal part of the three-dimensional coordinate value of each point in each point cloud space bounding box as a correction value for storage.
[0013] Optionally, the point cloud data compression method also includes: determining the compression rate of the point cloud data based on the storage space of the compressed point cloud data and the storage space of the point cloud data before compression.
[0014] Optionally, the point cloud data compression method also includes: decoding the three-dimensional coordinate values of each point in each point cloud space bounding box based on the minimum coordinate point of each point cloud space bounding box, the base value of the three-dimensional coordinate values of each point in each point cloud space bounding box, and the correction value of the three-dimensional coordinate values of each point in each point cloud space bounding box.
[0015] According to another aspect of an embodiment of the present invention, a point cloud data compression device is also provided. The device includes: a collection unit, used to collect point cloud data of a mine operation scene, wherein the point cloud data is used to characterize the terrain features of the mine operation scene; a block division unit, used to divide the point cloud data into blocks according to a preset span threshold, and obtain multiple data blocks, wherein the data block includes a three-dimensional point set, and the three-dimensional point set is used to characterize the terrain of the area corresponding to the data block in the mine operation scene, and the preset span threshold is associated with the terrain complexity and data transmission requirements of the mine operation scene, and the data transmission requirements are used to at least indicate the data transmission bandwidth of the mine operation scene; a determination unit, used to determine the point cloud space bounding box corresponding to each data block, and determine the minimum coordinate point of each point cloud space bounding box, wherein the point cloud space bounding box is used to characterize the three-dimensional space range of the point cloud data in each data block; a conversion unit, used to convert the initial three-dimensional coordinates of the points in each point cloud space bounding box from the absolute coordinate space to the relative coordinate space based on the minimum coordinate point of each point cloud space bounding box, and obtain the target three-dimensional coordinates; a compression unit, used to compress the target three-dimensional coordinates to obtain compressed point cloud data.
[0016] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0017] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0018] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0019] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0020] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.
[0021] In an embodiment of the present invention, after collecting the point cloud data of the mining operation scene, the point cloud data can be divided into blocks according to a preset span threshold, and then the point cloud space bounding box corresponding to each point cloud data block is determined, and the point cloud data is converted from the absolute coordinate space to the relative coordinate space with the minimum coordinate point in the point cloud space bounding box as a reference, and the target three-dimensional coordinates corresponding to each point cloud data in the relative coordinate space are obtained, and then the target three-dimensional coordinates corresponding to the point cloud data in each point cloud bounding box are compressed to obtain compressed point cloud data. Among them, by dividing the data into blocks, large-scale point cloud data can be divided into multiple smaller data sets, so that parallel operations can be performed when processing the data sets, thereby improving the data processing speed and efficiency. Converting each point in the divided point cloud data from the absolute coordinate space to the relative coordinate space effectively reduces the magnitude of the coordinate values of the point cloud data. Therefore, under the premise of ensuring data accuracy, a coding type that occupies smaller bytes can be used to encode the point cloud data, thereby greatly compressing the storage space occupied by the point cloud data, effectively improving the compression rate of the point cloud data, reducing data transmission time, and reducing storage costs, thereby solving the technical problems of high data storage costs and poor data transmission efficiency caused by poor compression of point cloud data. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0023] Figure 1 is a flow chart of a method for compressing point cloud data according to an embodiment of the present invention;
[0024] Figure 2 is a schematic diagram of distribution of a three-dimensional point set in a data block in an absolute coordinate space according to an embodiment of the present invention;
[0025] Figure 3 is a schematic diagram of a point cloud space bounding box according to an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of a point cloud data compression device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] According to an embodiment of the present invention, a method embodiment for compressing point cloud data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 is a flow chart of a method for compressing point cloud data according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0031] Step S101, collecting point cloud data of the mining operation scene.
[0032] In the technical solution provided in the above step S101 of the present application, point cloud data is used to characterize the terrain of the mining operation scene.
[0033] In this embodiment, point cloud data of the mining operation scene is collected by a data acquisition device, wherein the data acquisition device can be a three-dimensional laser scanning device, a drone, a ground laser scanning device, a radar, etc., and no specific limitation is made here.
[0034] For example, taking 3D laser scanning equipment as an example, 3D laser scanning equipment can be used to scan in mining operation scenes. The laser scanning equipment can emit laser pulses, measure the time difference from laser emission to return, and combine the equipment's posture information and position information to calculate the three-dimensional coordinates of each laser point, thereby generating high-precision point cloud data for the entire mining operation scene.
[0035] Step S102: dividing the point cloud data into blocks according to a preset span threshold to obtain a plurality of data blocks.
[0036] In the technical solution provided in the above step S102 of the present application, the preset span threshold is associated with the terrain complexity and data transmission requirements of the mining operation scene, and the data transmission requirements are used to at least indicate the data transmission bandwidth of the mining operation scene. That is, the preset span threshold can be set in advance according to the degree of terrain change of the mining operation scene and the maximum data transmission bandwidth in the mining operation scene, so as to reasonably block the point cloud data according to the preset span threshold, so that each data block can capture sufficient terrain information without being too redundant, ensuring that under the conditions of limited network bandwidth and storage space, data can still be efficiently transmitted and stored to meet the real-time and high-precision requirements of mining operations.
[0037] In this embodiment, the point cloud data is divided into blocks according to the preset span threshold, and the complete point cloud data corresponding to the mining operation scene can be divided into multiple smaller data blocks, wherein each data block contains a set of three-dimensional points in a specific area. A data block can also be called a block tile.
[0038] Optionally, assuming that the span threshold is 10 meters, the work scene can be divided into 10m×10m grids. For example, an area from X=0 to X=1000 meters and from Y=0 to Y=1000 meters can be divided into 100×100 grids, each of which is 10m×10m in size. For each 10m×10m grid, all point cloud data located within the grid are determined to form a data block. Each data block contains all three-dimensional point sets in the area, and the coordinates of these point sets are the absolute coordinates of the point cloud data in the area. For example, all point cloud data collected in the grid from X=0 to X=10 meters and Y=0 to Y=10 meters will constitute the first data block.
[0039] Optionally, the coordinate values of the three-dimensional coordinates of all points in the three-dimensional point set in each data block are expressed in double-precision floating point type. For example, the three-dimensional coordinate value corresponding to each point P is expressed as a double type (double:x, double:y, double:z).
[0040] In this step, since the amount of point cloud data is usually large, direct transmission or storage requires high transmission bandwidth and storage space. Therefore, block processing is adopted to divide the point cloud data of the entire work scene into multiple smaller data blocks. This block processing can refine data management to local areas, facilitate independent processing and transmission of each data block, thereby reducing the overall data processing and transmission burden.
[0041] Step S103, determining the point cloud space bounding box corresponding to each data block, and determining the minimum coordinate point of each point cloud space bounding box.
[0042] In the technical solution provided in the above step S103 of the present application, the point cloud space bounding box corresponding to the data block is used to represent the three-dimensional space range of the point cloud data in the data block.
[0043] In this embodiment, after the point cloud data is divided into multiple data blocks, the point cloud space bounding box corresponding to each data block can be determined, and the point cloud space bounding box and the minimum coordinate point can be determined according to the three-dimensional coordinate values of each point in the three-dimensional point set in the data block.
[0044] Optionally, taking a data block as an example, each point in the three-dimensional point set (list) corresponding to the data block can be traversed, and then the point cloud space bounding box corresponding to the data block can be determined according to the three-dimensional coordinate values of each traversed point.
[0045] For example, Figure 2 is a schematic diagram of the distribution of a three-dimensional point set in a data block in an absolute coordinate space according to an embodiment of the present invention, such as Figure 2 As shown, each point P in this point set is represented by its coordinate values in three dimensions: X, Y, and Z. Traversing this point set means visiting each point in the point set in sequence, checking and recording the coordinate values of each point.
[0046] Optionally, during the traversal process, the minimum and maximum values in the three dimensions of X, Y, and Z can be calculated and recorded. For example, starting from the first point in the traversal of the three-dimensional point set, its coordinate value is set to the current minimum and maximum value, and then the subsequent points are traversed. For each point's coordinate value, it is compared with the currently recorded minimum and maximum value. If a smaller value is found, the minimum value is updated, and if a larger value is found, the maximum value is updated. Similarly, for the X coordinate, the minimum coordinate value min_x and the maximum coordinate value max_x in the entire data block can be found, for the Y coordinate, the minimum coordinate value min_y and the maximum coordinate value max_y in the entire data block can be found, and for the Z coordinate, the minimum coordinate value min_z and the maximum coordinate value max_z in the entire data block can be found.
[0047] Optionally, after determining the minimum and maximum coordinate values on each coordinate axis in the data block, the point cloud space bounding box information corresponding to the data block can be determined according to the minimum and maximum coordinate values, that is, the minimum point coordinates of the bounding box coordinate values min_coor (min_x, min_y, min_z), and the maximum point coordinates max_coor (max_x, max_y, max_z). Figure 3 is a schematic diagram of a point cloud space bounding box according to an embodiment of the present invention, such as Figure 3 As shown, the lower left corner of the bounding box corresponds to the minimum coordinate point, and the upper right corner corresponds to the maximum coordinate point.
[0048] In this step, by determining the point cloud space bounding box corresponding to each data block and determining the minimum coordinate point of each point cloud space bounding box, the three-dimensional spatial information of the point cloud data in each data block can be effectively captured and processed, while reducing the amount of data, making efficient transmission and storage of data possible.
[0049] Step S104 , based on the minimum coordinate point of each point cloud space bounding box, the initial three-dimensional coordinates of the points in each point cloud space bounding box are converted from the absolute coordinate space to the relative coordinate space to obtain the target three-dimensional coordinates.
[0050] In the technical solution provided in the above step S104 of the present application, after the minimum coordinate point of each point cloud space bounding box is determined through the above step S103, the minimum coordinate point can be used as the coordinate origin to determine the initial three-dimensional coordinates of each point in the point cloud space bounding box in the absolute coordinate space, and the initial three-dimensional coordinates of each point can be converted from the absolute coordinate space to the relative coordinate space, thereby obtaining the target three-dimensional coordinates corresponding to each point in the relative coordinate space.
[0051] In this embodiment, when converting the initial three-dimensional coordinates of each point from the absolute coordinate space to the relative coordinate space, the initial three-dimensional coordinates of each point in each point cloud space bounding box can be traversed, and then the initial three-dimensional coordinates (x, y, z) of each point can be transformed from the absolute coordinate space to the relative coordinate space with the minimum coordinate point (min_coor) of the point cloud space bounding box as the origin.
[0052] For example, by subtracting min_coor from the coordinates (x, y, z) of the traversed point P, we can get p'(x', y', z') of the point P in the relative coordinate space. At this time, all the coordinate values of p' are non-negative numbers. After the transformation, the coordinates of all points form a new three-dimensional point set (list'). The coordinate transformation algorithm can be expressed by the following formula:
[0053] p'(x', y', z')=p(x, y, z)-min_coor
[0054] Optionally, since the entire boundary range of an open-pit mine is generally no more than 10 kilometers, and the floating point type can achieve centimeter-level data accuracy when representing a data range less than 100 kilometers, the coordinate value data type in the relative coordinate space can be represented by float to meet the accuracy requirements.
[0055] Step S105, compressing the target three-dimensional coordinates to obtain compressed point cloud data.
[0056] In the technical solution provided in the above step S105 of the present application, after the points in each point cloud space bounding box are converted from the absolute coordinate space to the relative coordinate space through the above step S105, the target three-dimensional coordinates corresponding to each point in the relative coordinate space can be compressed to obtain compressed point cloud data.
[0057] In this embodiment, the compression processing of the target three-dimensional coordinates is achieved by encoding the integer part and the decimal part of the coordinate value of the target three-dimensional coordinates.
[0058] For example, the three coordinate values in the target three-dimensional coordinates can be decomposed into an integer part and a decimal part, respectively, where the integer part can be marked as a base value (high_v) and the decimal part can be marked as a correction value (low_v). The base value part is responsible for storing the integer part of the coordinate value, that is, the value after removing the decimal point. This part is used to represent the basic position information of the point in space and is the key to maintaining the approximate position of the point cloud data after compression. The correction value part saves the first two digits of the decimal part of the coordinate value, which is used to perform precision correction on the base value part during decompression to restore centimeter-level high-precision coordinate values.
[0059] Optionally, after decomposing the coordinate value in the target three-dimensional coordinate into an integer part and a decimal part and marking them with a base value and a correction value respectively, the encoding types for encoding the integer part and the decimal part may be determined respectively.
[0060] Optionally, since the entire boundary range of the open-pit mining operation scene is generally not more than 10 kilometers, and the scale of a single point cloud data set is much smaller than 255 meters, the integer part is represented by the character data type (char) to meet the data with a span less than 255 meters, and since the accuracy of a single point cloud data set is generally not more than 5 centimeters, the decimal part is represented by the char type to meet the accuracy expression requirement of 2 decimal places.
[0061] In this step, by using data of type char (1 byte, value range 0-255), high_v can effectively represent the cardinality of point cloud data sets with a span of less than 255 meters, thereby significantly reducing storage space requirements and network transmission bandwidth; low_v is also stored using the char type, which can accurately represent values with two decimal places, meeting the centimeter-level accuracy requirements of high-precision point cloud data. By converting low_v to decimal form and adding it to high_v, the original coordinate value can be accurately restored, ensuring that the accuracy of the point cloud data is maintained during compression and decompression.
[0062] In the above steps S101 to S105, large-scale point cloud data can be divided into multiple smaller data sets by data segmentation, so that parallel operations can be performed when processing the data sets, thereby improving the data processing speed and efficiency. Each point in the segmented point cloud data is converted from the absolute coordinate space to the relative coordinate space, which effectively reduces the magnitude of the coordinate value of the point cloud data. Therefore, under the premise of ensuring data accuracy, a coding type that occupies fewer bytes can be used to encode the point cloud data, thereby greatly compressing the storage space occupied by the point cloud data, effectively improving the compression rate of the point cloud data, reducing the data transmission time, and reducing the storage cost, thereby solving the technical problems of high data storage cost and poor data transmission efficiency caused by poor compression effect of point cloud data.
[0063] Next, the compression method of the point cloud data is further introduced.
[0064] As an optional implementation, step S102, according to a preset span threshold, the point cloud data is divided into blocks to obtain multiple data blocks, including: establishing a point cloud map of the mining operation scene based on the point cloud data, wherein the point cloud map is used to characterize the terrain structure of the mining operation scene; according to the preset span threshold, the point cloud map is divided into multiple virtual grids, wherein the side length of each virtual grid is the same as the preset span threshold; based on the position of each point in the point cloud data in the point cloud map, each point is mapped to the corresponding virtual grid; the point cloud data mapped to the same virtual grid is integrated into a data block to obtain multiple data blocks.
[0065] In this embodiment, since the point cloud data is used to represent the topography of the mine operation scene, based on this, a point cloud map of the mine operation scene can be drawn in a three-dimensional coordinate system based on the point cloud data. The point cloud map can show the topographic structure of the mine operation scene. Since the amount of point cloud data is large, based on this, in order to facilitate data processing, the point cloud data can be divided into multiple data blocks.
[0066] For example, a series of virtual grids can be divided on the point cloud map according to a preset span threshold. These grids constitute the grid system of the point cloud map, and each grid defines a square area (on the XY plane) or a cube area (in three-dimensional space) with a side length of the preset span threshold. This division method decomposes complex large-scale terrain information into multiple small-scale local information.
[0067] Optionally, after dividing multiple grids from the point cloud map, these points can be mapped to corresponding virtual grids based on the position of each point in the point cloud data in the point cloud map. Specifically, the coordinates (X, Y, Z) of each point will be used to determine which virtual grid it belongs to. For example, for a 10m×10m virtual grid, if a point's X coordinate and Y coordinate are within the range of 10m×10m, then the point is mapped to this grid.
[0068] Optionally, after mapping each point in the point cloud data to a virtual grid of the point cloud map, all point cloud data mapped to the same virtual grid can be integrated into a data block. Each data block represents the terrain details within the virtual grid and contains the relative coordinate information of all points in the grid. In this way, the entire point cloud map is divided into multiple independent data blocks, each of which can be considered as a local terrain fragment.
[0069] As an optional implementation, step S103, determining the point cloud space bounding box corresponding to each data block, includes: traversing the three-dimensional point set in each data block, and recording the initial three-dimensional coordinates of each point in the three-dimensional point set; based on the initial three-dimensional coordinates of each point, determining the maximum coordinate value and minimum coordinate value of each point in the horizontal direction of the three-dimensional space, the maximum coordinate value and minimum coordinate value in the vertical direction, and the maximum coordinate value and minimum coordinate value in the height direction; based on the maximum coordinate value and minimum coordinate value in the horizontal direction, the maximum coordinate value and minimum coordinate value in the vertical direction, and the maximum coordinate value and minimum coordinate value in the height direction of each point in each three-dimensional point set in the three-dimensional space, determining the size information of the point cloud space bounding box corresponding to each data block, wherein the size information is used to characterize the length, width and height of the point cloud space bounding box; based on the size information of each point cloud space bounding box, constructing the point cloud space bounding box corresponding to each data block.
[0070] In this embodiment, for each data block divided in the point cloud map, the three-dimensional point set in the data block is traversed. During the traversal process, the initial coordinate values of each point in the three-dimensional space are recorded, including the coordinates of X (horizontal direction), Y (vertical direction) and Z (height direction). Based on the coordinate values recorded during the traversal process, the boundary of the point cloud space bounding box of each data block is calculated. For example, the maximum and minimum coordinate values on the three coordinate axes of X, Y, and Z are found. That is, for the X-axis, the maximum and minimum positions of the point cloud in the data block in the X direction are determined; for the Y-axis, the maximum and minimum positions in the Y direction are determined; for the Z-axis, the maximum and minimum positions in the height direction are determined. These maximum and minimum coordinate values define the boundaries of the point cloud space bounding box.
[0071] Optionally, once the maximum and minimum coordinate values of the point cloud in each data block in the three directions of X, Y, and Z are determined, the point cloud space bounding box corresponding to the data block can be constructed. The size information (length, width, and height) of the bounding box is directly determined by the difference between these maximum and minimum coordinate values. For example, the length of the data block in the X direction can be obtained by max_x-min_x, the width in the Y direction can be obtained by max_y-min_y, and the height in the Z direction can be obtained by max_z-min_z. In this way, the size information fully characterizes the spatial range of the bounding box, and the construction of the bounding box is completed.
[0072] As an optional implementation, determining the minimum coordinate point of each point cloud space bounding box includes: determining the minimum coordinate value in the horizontal direction, the minimum coordinate value in the vertical direction, and the minimum coordinate value in the height direction of the point in the point cloud space bounding box based on the initial three-dimensional coordinates of each point in each point cloud space bounding box; and determining the point corresponding to the minimum coordinate value in the horizontal direction, the minimum coordinate value in the vertical direction, and the minimum coordinate value in the height direction as the minimum coordinate point of the point cloud space bounding box.
[0073] In this embodiment, for each data block in the point cloud map, all three-dimensional point sets contained therein are traversed. Each point in the point set is represented by its coordinates in three-dimensional space, that is, the coordinate values of X (horizontal direction), Y (vertical direction) and Z (height direction). By traversing the points in the three-dimensional point set, the point with the smallest coordinate value in the three directions of X, Y, and Z in the data block corresponding to the three-dimensional point set can be found, and then the point is determined as the minimum coordinate point of the bounding box of the point cloud space.
[0074] Optionally, the process of determining the minimum coordinate point is crucial for subsequent data compression and conversion. Based on this point, the coordinates of all points in each data block can be converted to the coordinates of the minimum coordinate point corresponding to the data block, so that the coordinate values of all points become non-negative numbers, thereby facilitating efficient storage and transmission of data. This conversion not only reduces the absolute numerical range of point cloud data, but also further compresses the amount of data by using a smaller data type (such as converting from double to float or integer encoding) to store these coordinate values, reducing storage space and network bandwidth requirements, and improving the efficiency of data processing and transmission.
[0075] As an optional implementation, step S104, based on the minimum coordinate point of each point cloud space bounding box, converts the initial three-dimensional coordinates of the points in each point cloud space bounding box from the absolute coordinate space to the relative coordinate space to obtain the target three-dimensional coordinates, including: taking the minimum coordinate point corresponding to each point cloud space bounding box as the coordinate origin, and determining the difference between the initial three-dimensional coordinates of each point in each point cloud space bounding box and the three-dimensional coordinates of the coordinate origin; based on the difference, determining the target three-dimensional coordinates of each point in each point cloud space bounding box in the relative coordinate space, wherein the coordinate values in the target three-dimensional coordinates are all non-negative numbers.
[0076] In this embodiment, when converting the initial three-dimensional coordinates of the points in each point cloud space bounding box from the absolute space coordinates to the relative coordinate space, the minimum coordinate point in each point cloud space bounding box can be used as the coordinate origin, and then the difference between each coordinate value in the initial three-dimensional coordinates of each point in the point cloud space bounding box and the coordinate value corresponding to the coordinate origin is calculated to obtain the target three-dimensional coordinates corresponding to the initial three-dimensional coordinates of each point in the relative coordinate space. Compared with the initial three-dimensional coordinates, the target three-dimensional coordinates are the offsets relative to the minimum coordinate point. Since the coordinate value of the minimum coordinate point is the minimum value in the data block, after converting the points in the point cloud space bounding box from the initial three-dimensional coordinates to the target three-dimensional coordinates, the coordinate values of the target three-dimensional coordinates are all non-negative numbers.
[0077] In this step, the point cloud data is converted from the absolute coordinate space to the relative coordinate space. The relative coordinate values are usually much smaller than the absolute coordinate values, especially within the data block. This makes it possible to use smaller data types (such as converting from double to float, or further converting to integer encoding) to store these coordinate values, thereby significantly reducing the data storage space and the amount of data during transmission.
[0078] As an optional implementation, step S105 compresses the target three-dimensional coordinates to obtain compressed point cloud data, including: constructing a new three-dimensional point set based on the target three-dimensional coordinates of the points in each point cloud space bounding box in the relative coordinate space, and obtaining multiple new three-dimensional point sets, wherein the target three-dimensional coordinates of the points in the new three-dimensional point set are stored in a floating point type; traversing each point in each new three-dimensional point set, and decomposing the three-dimensional coordinate values of each traversed point into an integer part and a decimal part; encoding the integer part and the decimal part of the three-dimensional coordinate values of each point in each new three-dimensional point set based on the three-dimensional space range corresponding to each point cloud space bounding box in the mining operation scene, to obtain compressed point cloud data.
[0079] In this embodiment, after the point cloud data is converted into the relative coordinate space, a new 3D point set is constructed, wherein the target 3D coordinates of each point are the offset relative to the minimum coordinate point of the data block. Because floating point numbers can accurately represent the position of a point in space, especially under centimeter-level accuracy requirements, the coordinate values in the target 3D coordinates can be stored using floating point types.
[0080] Optionally, traverse each point in the new 3D point set and decompose the 3D coordinate value of each point, each coordinate value is decomposed into its integer part and decimal part. For example, a coordinate value 5.23 is decomposed into an integer part 5 and a decimal part 0.23.
[0081] Optionally, based on the three-dimensional spatial range of each data block in the mining operation scene, the integer part and the decimal part of the three-dimensional coordinate value of each point are encoded. The purpose of encoding is to reduce the amount of data and improve storage and transmission efficiency. For the integer part, since the span of the mining operation scene is limited, a smaller data type (such as char, whose value range is 0-255) can usually be used for encoding, as long as this range is sufficient to cover the entire spatial range of the data block. For the decimal part, considering the centimeter-level accuracy requirements, the decimal places are usually encoded. For example, two decimal places can be encoded, so that each decimal part can also be represented by the char type, meeting the accuracy requirements while reducing the amount of data.
[0082] As an optional implementation, based on the three-dimensional spatial range corresponding to each point cloud space bounding box in the mining operation scene, the integer part and the decimal part of the three-dimensional coordinate value of each point in each new three-dimensional point set are encoded to obtain compressed point cloud data, including: based on the three-dimensional spatial range corresponding to each point cloud space bounding box in the mining operation scene, determining the encoding type for encoding the integer part of the three-dimensional coordinate value of each point in each new three-dimensional point set, and based on the coordinate accuracy of each point in each point cloud space bounding box, determining the encoding type for encoding the decimal part of the three-dimensional coordinate value of each point in each new three-dimensional point set, wherein the encoding type corresponding to the integer part is the same as the encoding type for encoding the decimal part, and both occupy one byte; based on the encoding type corresponding to the integer part, the integer part of the three-dimensional coordinate value of each point in each point cloud space bounding box is encoded, and based on the encoding type corresponding to the decimal part, the decimal part of the three-dimensional coordinate value of each point in each point cloud space bounding box is encoded.
[0083] In this embodiment, the encoding type is determined based on two key factors: the three-dimensional spatial range of the point cloud space bounding box in the mine operation scene, and the coordinate accuracy of each point. For the integer part and the decimal part, the same type of data encoding is used, and this data type occupies one byte. In most cases, the char type is a suitable choice because its value range is 0-255, which can cover the coordinate range of the local mine scene and occupy less storage space.
[0084] Optionally, for each point's target 3D coordinate p'(x', y', z') in the relative coordinate space, first encode the integer part of the coordinate value. Since the range of the relative coordinate space is limited and the char type is selected for encoding, it is necessary to ensure that the coordinate range of the entire data block does not exceed 255 meters. In this way, the integer part of each coordinate value can be represented by a char variable, thereby greatly reducing the storage space requirement.
[0085] Optionally, the encoding of the decimal part is based on the coordinate accuracy of the point cloud data. For example, if the coordinate accuracy is required to be in centimeters, the decimal part usually needs to be encoded with two decimal places. The char type is also used for encoding, which means that each decimal part has a value range of 0-99, which can be converted to an integer value between 0-255 and stored in one byte. This conversion can be done by multiplying the decimal part by 100 (or multiplying the coordinate value by 100 to convert centimeters to integers in meters) and then encoding the integer.
[0086] In this step, by decomposing the three-dimensional coordinate value of each point into an integer part and a decimal part, and encoding the two parts using the char type, significant data compression is achieved. Each coordinate value now only requires two bytes to store (one byte to store the integer part and one byte to store the decimal part), which significantly reduces the storage space compared to the original double type (each coordinate value occupies 8 bytes).
[0087] As an optional implementation, the point cloud data compression method also includes: marking the integer part of the three-dimensional coordinate value of each point in each point cloud space bounding box as a base value for storage, and marking the first two digits of the decimal part of the three-dimensional coordinate value of each point in each point cloud space bounding box as a correction value for storage.
[0088] In this embodiment, in the point cloud space bounding box, the three-dimensional coordinate value of each point can be decomposed into an integer part and a decimal part after being converted into relative coordinates. The integer part, that is, the integer part of the coordinate value, is called the "base value". The base value represents the baseline position of the point in three-dimensional space relative to the minimum coordinate point (coordinate origin), and it is stored in a one-byte char type. This is because the data block size in the open-pit mining operation scene is limited, and the value range of the char type (0-255) is sufficient to cover the possible range of the base value, while occupying less storage space, which is conducive to data compression.
[0089] Optionally, the decimal part of the coordinate value, especially the first two digits, is regarded as a "correction value". The correction value is used to accurately describe the position of the point to ensure that the coordinate accuracy can reach the centimeter level. Since only two decimal places need to be stored, the one-byte char type can also be used to store the correction value, and the decimal part is multiplied by 100 to convert it to an integer before storage. In this way, even under the centimeter-level accuracy requirement, each correction value can be accurately represented while occupying less storage space.
[0090] As an optional implementation, the point cloud data compression method further includes: determining a compression rate of the point cloud data based on a storage space of the compressed point cloud data and a storage space of the point cloud data before compression.
[0091] In this embodiment, before data compression, the three-dimensional coordinate value of each point cloud data is usually stored using a double type, and each double type value occupies 8 bytes. If a point cloud data block contains n points, then the storage space before compression (C_origin, referred to as C) will be the sum of the space occupied by the three coordinate values of each point, that is, C = 3*8*n bytes.
[0092] Optionally, after data compression, the three-dimensional coordinate value of each point is decomposed into an integer part (base value) and the first two digits of the decimal part (corrected value), and both parts are stored using the char type, with each char type value occupying 1 byte. Therefore, the compressed storage space (C_compressed) is the sum of the space occupied by the three base values and three corrected values of each point, that is, C=3*(1+1)*n bytes. In addition, it is also necessary to store the information of the minimum coordinate point min_coor, which consists of three doub le type values and occupies 3*8 bytes. Therefore, the total storage space after compression is C=3*(1+1)*n+3*8 bytes. Therefore, it can be determined that the compression rate r=1-c2 / c1=75%.
[0093] In this step, the compression rate shows that the compression algorithm of the point cloud data in the embodiment of the present invention can effectively reduce the proportion of the original data storage space, can significantly reduce the storage space and network transmission bandwidth requirements, and help to improve the efficiency of data processing and transmission in scenarios such as open-pit mines, while reducing storage and transmission costs.
[0094] As an optional implementation, the point cloud data compression method also includes: decoding the three-dimensional coordinate values of each point in each point cloud space bounding box based on the minimum coordinate point of each point cloud space bounding box, the base value of the three-dimensional coordinate values of each point in each point cloud space bounding box, and the correction value of the three-dimensional coordinate values of each point in each point cloud space bounding box.
[0095] In this embodiment, the point cloud data is decoded based on the minimum coordinate point, base value and correction value of each point cloud space bounding box, which is the inverse process of the data compression algorithm and aims to restore the three-dimensional coordinate value of the original point cloud data from the compressed data.
[0096] Optionally, read the base value and correction value of each point from the compressed data. Since the base value and correction value are stored in char type, they need to be converted back to floating point type in order to calculate the original three-dimensional coordinate value.
[0097] For example, it can be decoded by the following formula: v=min_coor+high_v+low_v / 100.0, wherein v is used to represent the original coordinate value obtained by decoding.
[0098] In this step, the 3D coordinate values of the original point cloud data can be restored from the compressed point cloud data, where the coordinate value of each point is restored to the centimeter-level accuracy before compression. This process ensures the accuracy and consistency of data compression and decompression, which helps to quickly and efficiently update and process point cloud data in open-pit mining scenarios while maintaining the required high accuracy.
[0099] According to an embodiment of the present invention, a point cloud data compression device is also provided. It should be noted that the point cloud data compression device can be used to execute the point cloud data compression method in the embodiment of the present invention.
[0100] Figure 4 4 is a schematic diagram of a point cloud data compression device according to an embodiment of the present invention. The point cloud data compression device 400 comprises: a collection unit 401 , a block unit 402 , a determination unit 403 , a conversion unit 404 and a compression unit 405 .
[0101] The acquisition unit 401 is used to acquire point cloud data of a mine operation scene, wherein the point cloud data is used to characterize the terrain features of the mine operation scene.
[0102] The blocking unit 402 is used to block the point cloud data according to a preset span threshold to obtain multiple data blocks, wherein the data block includes a three-dimensional point set, and the three-dimensional point set is used to characterize the terrain of the area corresponding to the data block in the mining operation scene. The preset span threshold is associated with the terrain complexity and data transmission requirements of the mining operation scene, and the data transmission requirements are used to at least indicate the data transmission bandwidth of the mining operation scene.
[0103] The determination unit 403 is used to determine the point cloud space bounding box corresponding to each data block and determine the minimum coordinate point of each point cloud space bounding box, wherein the point cloud space bounding box is used to represent the three-dimensional space range of the point cloud data in each data block.
[0104] The conversion unit 404 is used to convert the initial three-dimensional coordinates of the points in each point cloud space bounding box from the absolute coordinate space to the relative coordinate space based on the minimum coordinate point of each point cloud space bounding box to obtain the target three-dimensional coordinates.
[0105] The compression unit 405 is used to compress the target three-dimensional coordinates to obtain compressed point cloud data.
[0106] Optionally, the blocking unit 402 also includes: an establishment module, which is used to establish a point cloud map of a mining operation scene based on the point cloud data, wherein the point cloud map is used to characterize the terrain structure of the mining operation scene; a division module, which is used to divide the point cloud map into multiple virtual grids according to a preset span threshold, wherein the side length of each virtual grid is the same as the preset span threshold; a mapping module, which is used to map each point in the point cloud data to a corresponding virtual grid based on the position of each point in the point cloud map; and an integration module, which is used to integrate the point cloud data mapped to the same virtual grid into a data block to obtain multiple data blocks.
[0107] Optionally, the determination unit 403 also includes: a first traversal module, used to traverse the three-dimensional point set in each data block and record the initial three-dimensional coordinates of each point in the three-dimensional point set; a first determination module, used to determine the maximum coordinate value and minimum coordinate value of each point in the horizontal direction of the three-dimensional space, the maximum coordinate value and minimum coordinate value in the vertical direction, and the maximum coordinate value and minimum coordinate value in the height direction based on the initial three-dimensional coordinates of each point; a second determination module, used to determine the size information of the point cloud space bounding box corresponding to each data block based on the maximum coordinate value and minimum coordinate value in the horizontal direction, the maximum coordinate value and minimum coordinate value in the vertical direction, and the maximum coordinate value and minimum coordinate value in the height direction of each point in each three-dimensional point set in the three-dimensional space, wherein the size information is used to characterize the length, width and height of the point cloud space bounding box; a first construction module, used to construct the point cloud space bounding box corresponding to each data block based on the size information of each point cloud space bounding box.
[0108] Optionally, the determination unit 403 also includes: a third determination module, used to determine the minimum coordinate value in the horizontal direction, the minimum coordinate value in the vertical direction, and the minimum coordinate value in the height direction of the point in the point cloud space bounding box based on the initial three-dimensional coordinates of each point in each point cloud space bounding box; a fourth determination module, used to determine the point corresponding to the minimum coordinate value in the horizontal direction, the minimum coordinate value in the vertical direction, and the minimum coordinate value in the height direction as the minimum coordinate point of the point cloud space bounding box.
[0109] Optionally, the conversion unit 404 also includes: a fifth determination module, which is used to determine the difference between the initial three-dimensional coordinates of each point in each point cloud space bounding box and the three-dimensional coordinates of the coordinate origin, taking the minimum coordinate point corresponding to each point cloud space bounding box as the coordinate origin; and a sixth determination module, which is used to determine the target three-dimensional coordinates of each point in each point cloud space bounding box in the relative coordinate space based on the difference, wherein the coordinate values in the target three-dimensional coordinates are all non-negative numbers.
[0110] Optionally, the compression unit 405 also includes: a second construction module, used to construct a new three-dimensional point set based on the target three-dimensional coordinates of the points in each point cloud space bounding box in the relative coordinate space, and obtain multiple new three-dimensional point sets, wherein the target three-dimensional coordinates of the points in the new three-dimensional point set are stored in a floating point type; a second traversal module, used to traverse each point in each new three-dimensional point set, and decompose the three-dimensional coordinate values of each traversed point into an integer part and a decimal part; an encoding module, used to encode the integer part and the decimal part of the three-dimensional coordinate values of each point in each new three-dimensional point set based on the three-dimensional space range corresponding to each point cloud space bounding box in the mining operation scene, to obtain compressed point cloud data.
[0111] Optionally, the encoding module is also used to: determine the encoding type for encoding the integer part of the three-dimensional coordinate value of each point in each new three-dimensional point set based on the three-dimensional spatial range corresponding to each point cloud space bounding box in the mining operation scene, and determine the encoding type for encoding the decimal part of the three-dimensional coordinate value of each point in each new three-dimensional point set based on the coordinate accuracy of each point in each point cloud space bounding box, wherein the encoding type corresponding to the integer part is the same as the encoding type for encoding the decimal part, and both occupy one byte; based on the encoding type corresponding to the integer part, encode the integer part of the three-dimensional coordinate value of each point in each point cloud space bounding box, and based on the encoding type corresponding to the decimal part, encode the decimal part of the three-dimensional coordinate value of each point in each point cloud space bounding box.
[0112] Optionally, the point cloud data compression device is also used to: mark the integer part of the three-dimensional coordinate value of each point in each point cloud space bounding box as a base value for storage, and mark the first two digits of the decimal part of the three-dimensional coordinate value of each point in each point cloud space bounding box as a correction value for storage.
[0113] Optionally, the point cloud data compression device is further used to determine the compression rate of the point cloud data based on the storage space of the compressed point cloud data and the storage space of the point cloud data before compression.
[0114] Optionally, the point cloud data compression device is also used to decode the three-dimensional coordinate values of each point in each point cloud space bounding box based on the minimum coordinate point of each point cloud space bounding box, the base value of the three-dimensional coordinate values of each point in each point cloud space bounding box, and the correction value of the three-dimensional coordinate values of each point in each point cloud space bounding box.
[0115] In this device, large-scale point cloud data can be divided into multiple smaller data sets by data segmentation, so that the data sets can be processed in parallel, thereby improving the data processing speed and efficiency. Each point in the segmented point cloud data is converted from the absolute coordinate space to the relative coordinate space, effectively reducing the magnitude of the coordinate value of the point cloud data. Therefore, under the premise of ensuring data accuracy, the point cloud data can be encoded using a coding type that occupies fewer bytes, thereby greatly reducing the storage space occupied by the compressed point cloud data, effectively improving the compression rate of the point cloud data, reducing the data transmission time, and reducing the storage cost, thereby solving the technical problems of high data storage cost and poor data transmission efficiency caused by poor compression effect of point cloud data.
[0116] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.
[0117] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0118] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.
[0119] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0120] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.
[0121] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0122] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0123] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0124] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0125] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0126] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0127] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for compressing point cloud data, characterized in that: include: Collecting point cloud data of a mine operation scene, wherein the point cloud data is used to characterize the terrain of the mine operation scene; According to a preset span threshold, the point cloud data is divided into blocks to obtain a plurality of data blocks, wherein the data block includes a three-dimensional point set, and the three-dimensional point set is used to characterize the terrain of the area corresponding to the data block in the mine operation scene, and the preset span threshold is associated with the terrain complexity and data transmission requirement of the mine operation scene, and the data transmission requirement is used to at least indicate the data transmission bandwidth of the mine operation scene; Determine a point cloud space bounding box corresponding to each of the data blocks, and determine the minimum coordinate point of each of the point cloud space bounding boxes, wherein the point cloud space bounding box is used to characterize the three-dimensional space range of the point cloud data in each of the data blocks; Based on the minimum coordinate point of each point cloud space bounding box, convert the initial three-dimensional coordinates of each point in the point cloud space bounding box from the absolute coordinate space to the relative coordinate space to obtain the target three-dimensional coordinates; The target three-dimensional coordinates are compressed to obtain compressed point cloud data.
2. The compression method according to claim 1, characterized in that: According to the preset span threshold, the point cloud data is divided into blocks to obtain multiple data blocks, including: Establishing a point cloud map of the mine operation scene based on the point cloud data, wherein the point cloud map is used to characterize the terrain structure of the mine operation scene; According to the preset span threshold, the point cloud map is divided into a plurality of virtual grids, wherein the side length of each virtual grid is the same as the preset span threshold; Based on the position of each point in the point cloud data in the point cloud map, mapping each point to a corresponding virtual grid; The point cloud data mapped to the same virtual grid are integrated into one data block to obtain a plurality of the data blocks.
3. The compression method according to claim 1, characterized in that: Determining the point cloud space bounding box corresponding to each of the data blocks includes: Traversing the three-dimensional point set in each of the data blocks, and recording the initial three-dimensional coordinates of each point in the three-dimensional point set; Based on the initial three-dimensional coordinates of each point, respectively determine the maximum coordinate value and the minimum coordinate value of each point in the horizontal direction, the maximum coordinate value and the minimum coordinate value in the vertical direction, and the maximum coordinate value and the minimum coordinate value in the height direction in the three-dimensional space; Based on the maximum coordinate value and the minimum coordinate value of each point in the three-dimensional point set in the horizontal direction, the maximum coordinate value and the minimum coordinate value in the vertical direction, and the maximum coordinate value and the minimum coordinate value in the height direction in the three-dimensional space, the size information of the point cloud space bounding box corresponding to each data block is determined, wherein the size information is used to represent the length, width and height of the point cloud space bounding box; Based on the size information of each point cloud space bounding box, a point cloud space bounding box corresponding to each data block is constructed.
4. The compression method according to claim 3, characterized in that: Determine the minimum coordinate point of each point cloud space bounding box, including: Based on the initial three-dimensional coordinates of each point in each of the point cloud space bounding boxes, determining the minimum coordinate value of the points in the point cloud space bounding box in the horizontal direction, the minimum coordinate value in the vertical direction, and the minimum coordinate value in the height direction; The point corresponding to the minimum coordinate value in the horizontal direction, the minimum coordinate value in the vertical direction, and the minimum coordinate value in the height direction is determined as the minimum coordinate point of the point cloud space bounding box.
5. The compression method according to claim 1, characterized in that: Based on the minimum coordinate point of each of the point cloud space bounding boxes, the initial three-dimensional coordinates of each point in the point cloud space bounding box are converted from the absolute coordinate space to the relative coordinate space to obtain the target three-dimensional coordinates, including: Taking the minimum coordinate point corresponding to each of the point cloud space bounding boxes as the coordinate origin, respectively determining the difference between the initial three-dimensional coordinates of each point in each of the point cloud space bounding boxes and the three-dimensional coordinates of the coordinate origin; Based on the difference, the target three-dimensional coordinates of each point in each point cloud space bounding box in the relative coordinate space are determined, wherein the coordinate values in the target three-dimensional coordinates are all non-negative numbers.
6. The compression method according to claim 1, characterized in that: The target three-dimensional coordinates are compressed to obtain compressed point cloud data, including: Based on the target three-dimensional coordinates of each point in the point cloud space bounding box in the relative coordinate space, a new three-dimensional point set is constructed to obtain a plurality of the new three-dimensional point sets, wherein the target three-dimensional coordinates of the points in the new three-dimensional point set are stored in a floating point type; Traversing each point in each of the new three-dimensional point sets, and decomposing the three-dimensional coordinate value of each traversed point into an integer part and a decimal part; Based on the three-dimensional space range corresponding to each point cloud space bounding box in the mining operation scene, the integer part and the decimal part of the three-dimensional coordinate value of each point in each new three-dimensional point set are encoded to obtain compressed point cloud data.
7. The compression method according to claim 6, characterized in that: Based on the three-dimensional space range corresponding to each point cloud space bounding box in the mine operation scene, the integer part and the decimal part of the three-dimensional coordinate value of each point in each new three-dimensional point set are encoded to obtain compressed point cloud data, including: Based on the three-dimensional space range corresponding to each point cloud space bounding box in the mine operation scene, determine the encoding type for encoding the integer part of the three-dimensional coordinate value of each point in each new three-dimensional point set, and based on the coordinate accuracy of each point in each point cloud space bounding box, determine the encoding type for encoding the decimal part of the three-dimensional coordinate value of each point in each new three-dimensional point set, wherein the encoding type corresponding to the integer part is the same as the encoding type for encoding the decimal part, and both occupy one byte; Based on the encoding type corresponding to the integer part, the integer part of the three-dimensional coordinate value of each point in each point cloud space bounding box is encoded, and based on the encoding type corresponding to the decimal part, the decimal part of the three-dimensional coordinate value of each point in each point cloud space bounding box is encoded.
8. The compression method according to claim 6, characterized in that: The method further comprises: The integer part of the three-dimensional coordinate value of each point in each point cloud space bounding box is marked as a base value for storage, and the first two digits of the decimal part of the three-dimensional coordinate value of each point in each point cloud space bounding box are marked as a correction value for storage.
9. The compression method according to any one of claims 1 to 8, characterized in that: The method further comprises: A compression rate of the point cloud data is determined based on a storage space of the compressed point cloud data and a storage space of the point cloud data before compression.
10. The compression method according to any one of claims 1 to 8, characterized in that: The method further comprises: Based on the minimum coordinate point of each point cloud space bounding box, the base value of the three-dimensional coordinate value of each point in each point cloud space bounding box, and the correction value of the three-dimensional coordinate value of each point in each point cloud space bounding box, the three-dimensional coordinate value of each point in each point cloud space bounding box is decoded.
11. A point cloud data compression device, characterized in that: include: A collection unit, used to collect point cloud data of a mine operation scene, wherein the point cloud data is used to characterize the terrain features of the mine operation scene; A block division unit, configured to divide the point cloud data into blocks according to a preset span threshold value to obtain a plurality of data blocks, wherein the data block includes a three-dimensional point set, and the three-dimensional point set is used to characterize the terrain of the area corresponding to the data block in the mine operation scene, and the preset span threshold value is associated with the terrain complexity and data transmission requirement of the mine operation scene, and the data transmission requirement is used to at least indicate the data transmission bandwidth of the mine operation scene; A determination unit, used to determine a point cloud space bounding box corresponding to each of the data blocks, and to determine a minimum coordinate point of each of the point cloud space bounding boxes, wherein the point cloud space bounding box is used to characterize a three-dimensional spatial range of the point cloud data in each of the data blocks; A conversion unit, configured to convert the initial three-dimensional coordinates of each point in the point cloud space bounding box from an absolute coordinate space to a relative coordinate space based on the minimum coordinate point of each point cloud space bounding box, so as to obtain a target three-dimensional coordinate; The compression unit is used to compress the target three-dimensional coordinates to obtain compressed point cloud data.
Citation Information
Cited By
Remote transmission and visualization method and device for point cloud data
CN121462567A