A high-speed slicing method and high-speed slicing tool for point cloud data

By adopting concurrently executed point cloud reading and sampling modules in point cloud data processing, combined with hierarchical slicing and compression processing, the problems of large memory consumption and long processing time in the prior art are solved, and the front-end interaction effect of high-speed slicing and optimization is achieved.

CN113362464BActive Publication Date: 2025-03-07BEIJING LUYAO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110568599.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-25
Publication Date
2025-03-07
Estimated Expiration
2041-05-25

AI Technical Summary

Technical Problem

When the prior art converts point cloud data into a processable format of three-dimensional data processing engines, there are problems such as large memory consumption and long processing time, which affects the interaction effect of the mobile front-end.

Method used

A high-speed slicing tool and method are adopted to execute concurrently through the point cloud reading module and the sampling module, directly transmit the point cloud block for sampling, reduce memory usage, and optimize file size through hierarchical slicing and compression processing.

Benefits of technology

It effectively reduces memory consumption and improves processing speed. The compressed slice file size is only about 22% of the uncompressed file, which significantly optimizes the front-end interaction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113362464B_ABST
    Figure CN113362464B_ABST
Patent Text Reader

Abstract

The present invention provides a high-speed slicing method and a high-speed slicing tool for point cloud data, S1. Obtain a file to be sliced ​​containing point cloud data and calculate the sampling interval; S2. The point cloud reading module reads the point cloud data in the file to be sliced ​​in blocks, and directly transmits the read point cloud blocks to the sampling module so that the sampling module and the point cloud reading module are executed concurrently; S3. The sampling module selects sampling points from each point cloud block according to the sampling interval; S4. The selected sampling points are respectively placed in the slices of the corresponding layer; S5. The point cloud data of each layer of slices or each layer of slices except the top layer is compressed and written into a slice file of a specific format. In this solution, reading point cloud and sampling are configured as a production-consumption process, and the read point cloud blocks are directly sent to the next step for sampling, which can save twice the memory space, and the reading of point cloud and sampling are executed concurrently, which can save the shorter execution time of the two and effectively improve the processing speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of point cloud data processing, and in particular relates to a method and a high-speed slicing tool capable of improving the speed of converting point cloud data into a format processable by a three-dimensional data processing engine. Background Art

[0002] The laser radar scan outputs the original point cloud format file .las. This format file cannot be directly used by the 3D data processing engine. It needs to go through a series of data processing to convert the original point cloud format file .las into a corresponding processable format. During the processing, data thinning, data preprocessing, layer calculation, data slicing and other operations are required.

[0003] At present, in the process of processing point cloud data, the slicing tool first reads the point cloud data, and memory A is needed to read the point cloud data; then the point cloud data in memory A is sampled and decomposed into a cubic grid, and memory B is needed to sample the point cloud data in memory A; then the sampled data in memory B is transferred to the layered slices, and memory C is needed again, that is, three times the memory is needed, which has the problem of high memory consumption, and each time the point cloud data needs to be read first, and then the sampling operation is performed. Since the point cloud data is huge, the result of this sequential processing method is that the conversion process takes too long, affecting the interactive effect of the mobile front end. Summary of the invention

[0004] The purpose of the present invention is to provide a high-speed slicing method and a high-speed slicing tool for point cloud data in order to solve the above problems.

[0005] In order to achieve the above object, the present invention adopts the following technical solutions:

[0006] A high-speed slicing tool and a method of using the same, comprising the following steps:

[0007] S1. Obtain the file to be sliced ​​containing point cloud data and calculate the sampling interval;

[0008] S2. The point cloud reading module reads the point cloud data in the file to be sliced ​​in blocks, and directly transmits the read point cloud blocks to the sampling module so that the sampling module and the point cloud reading module are executed concurrently;

[0009] S3. The sampling module selects sampling points from each point cloud block according to the sampling interval;

[0010] S4. Place the selected sampling points into slices of the corresponding layers respectively;

[0011] S5. compress the point cloud data of each layer of slices or each layer of slices except the top layer and write them into a slice file of a specific format.

[0012] In the above-mentioned high-speed slicing method of point cloud data, in step S3, after sampling is completed, it is determined whether the number of layers is appropriate. If so, the sampling points are placed in the slices of the corresponding layer. If not, the number of layers and sampling intervals are recalculated and steps S2 and S3 are repeated.

[0013] In the above-mentioned high-speed slicing method of point cloud data, non-uniform grid slicing is used in the top layer, and the top layer slicing type can be determined according to the length / height ratio of the point cloud data;

[0014] In step S5, the top slice is compressed or not compressed according to the range, and the remaining slices are compressed.

[0015] In the above-mentioned high-speed slicing method of point cloud data, the following steps are further included between steps S4 and S5:

[0016] First, the number of point clouds in each slice of each level is detected. If there is a slice with a point cloud number less than the first preset value, the following steps are performed:

[0017] A. a slice whose point cloud number is less than a first preset value is regarded as a specific slice;

[0018] B. Under the condition that the number of point clouds of the merged slice is less than a second preset value, merge several specific slices at the same level and / or merge at least one specific slice at the same level with a non-specific slice to obtain one or more merged slices.

[0019] In the above-mentioned high-speed slicing method of point cloud data, a thinning option of whether to thin or not and a denoising option of whether to denoise or not are provided for the user to choose, and whether to denoise or thin out the point cloud block in step S3 is determined according to the user's selection operation.

[0020] In the above-mentioned high-speed slicing method of point cloud data, when the user selects denoising, the noise points are screened and deleted, and when the user does not select denoising, no denoising is performed;

[0021] In step S3, the point cloud block is decomposed into several cubic grids according to the sampling interval, and the point closest to the center of each cubic grid is the selected sampling point; and when the user does not choose thinning, the unselected points are decomposed to the last slice below the bottom slice, and when the user chooses thinning, the unselected points are deleted.

[0022] In the above-mentioned high-speed slicing method of point cloud data, when the user does not select thinning, for each point cloud block, its unselected points are decomposed into the last layer of slices, and its selected sampling points are placed into the slices of the corresponding layer, and then the point cloud block is deleted;

[0023] When the user chooses to thin out, for each point cloud block, its selected sampling points are placed into the slice of the corresponding layer and then the point cloud block is deleted.

[0024] In the above-mentioned high-speed slicing method of point cloud data, in step S4, the selected sampling points are respectively placed in the multi-layered slices from the bottom slice to the top slice, and the selected points are respectively placed in the slices of the corresponding layers in the following manner:

[0025] First, the selected sampling points are separated from the sampling center by 2 x-1 The points of nm are put into the top slice, where x represents the current level, n represents the sampling interval, and m represents a natural number;

[0026] Then from the remaining sampling points, the interval between the sampling center and x-1 The points of nm are put into the second layer of slices, where x represents the current level, n represents the sampling interval, and m represents a natural number;

[0027] And so on, until the bottom layer of slices.

[0028] A high-speed slicing tool includes an interval calculation module, a point cloud reading module, a sampling module, a layered slicing module and a file writing module, wherein:

[0029] An interval calculation module, used to calculate the sampling interval according to the file to be sliced;

[0030] A point cloud reading module is used to read the point cloud data in the slice file in blocks and transmit the read point cloud blocks to the sampling module so that the sampling module and the point cloud reading module are executed concurrently;

[0031] A sampling module, used to select sampling points from each point cloud block received in sequence according to a sampling interval;

[0032] A layered slicing module is used to place the sampling points selected by the sampling module into the slices of the corresponding layer;

[0033] The file writing module is used to compress the point cloud data of each layer of slices or each layer of slices except the top layer and write them into a slice file of the corresponding format.

[0034] In the above-mentioned high-speed slicing tool, the sampling module is used to perform denoising and thinning processing on the point cloud data in the point cloud block, delete the noise points, and delete or decompose the points excluded by thinning to the last slice layer according to the user's choice;

[0035] A merging module is included, which is used to detect the number of point clouds in a slice, and merge the slice whose point cloud number is less than a first preset value, and can be merged with a slice whose point cloud number is also less than the first preset value, or with a slice whose point cloud number is more than the first preset value but relatively small;

[0036] It includes a layer number judgment module, which is used to judge whether the current number of layers is appropriate, and notify the interval calculation module to recalculate the number of layers, sampling interval or notify the layered slicing module to start layered slicing processing based on the judgment result.

[0037] The advantages of the present invention are:

[0038] 1. Reading point cloud-sampling is configured as a production-consumption process. The read point cloud blocks are directly sent to the next step for sampling, which can save twice the memory space;

[0039] 2. Concurrent execution of point cloud reading and sampling can save the shorter execution time of the two and effectively improve the processing speed;

[0040] 3. Compress the layered slices so that the total size of the generated slice files is only about 22% of the uncompressed files in the prior art;

[0041] 4. After sampling, most points come from the excluded points. For each point cloud block, put its selected points into the slices of the corresponding layer, or decompose its unselected points into the last layer slices at the same time, and then delete the point cloud block to achieve processing and deleting one block at a time, reducing memory consumption;

[0042] 5. Merge slices with very few points to reduce the number of final slice files, so it has the advantage of requiring fewer files to be loaded during display. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 This is a flow chart of the high-speed slicing method of point cloud data of the present invention;

[0044] Figure 2 It is a structural block diagram of the high-speed slicing tool of point cloud data of the present invention.

[0045] Description of the drawings: interval calculation module 1; point cloud reading module 2; sampling module 4; layered slicing module 5; file writing module 6; merging module 7; layer number judgment module 8. DETAILED DESCRIPTION

[0046] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0047] like Figure 1 and Figure 2As shown, the present embodiment provides a high-speed slicing tool, including an interval calculation module 1, a point cloud reading module 2, a sampling module 4, a layered slicing module 5 and a file writing module 6. After receiving a file to be sliced ​​containing point cloud data, the interval calculation module 1 calculates the sampling interval, transformation matrix and other contents according to the file to be sliced. The calculation method of the sampling interval, transformation matrix and the like here is consistent with the prior art and will not be repeated here. After calculating the sampling interval, the point cloud reading module 2 reads the point cloud data in the file to be sliced ​​in blocks and transmits the read point cloud blocks to the sampling module 4 so that the sampling module 4 and the point cloud reading module 2 are executed concurrently. The sampling module 4 selects sampling points from each point cloud block received in sequence according to the sampling interval, and then the layered slicing module 5 puts the sampling points selected by the sampling module 4 into the slices of the corresponding layer. Finally, the point cloud data of each layer of slices is compressed by the file writing module 6 and written into a slice file of a specific format.

[0048] This solution uses the Google Draco compression algorithm to compress point cloud data. The total size of the compressed slice file is only about 22% of the uncompressed size, effectively reducing the space occupied by the file.

[0049] Here, the main purpose is to receive point cloud files in .las format. After processing by this slicing tool, it outputs a format file that can be directly used by the 3D data processing engine, such as a slice file in xxx.pnts format, which can be quickly drawn by webgl. In addition, this slicing tool is also connected to the scheduling file tileset.json, which is used to determine which slice files need to be loaded.

[0050] Specifically, for the top-layer slice, compression or non-compression processing can be determined according to its range. Generally, compression is not performed, and compression processing is performed on the remaining layers of slices.

[0051] In this solution, the point cloud reading module 2 and the sampling module 4 constitute a production-consumption cycle process, producing and consuming one point cloud block each time in the order of the point cloud files to be sliced, for example, 4096 and 8192 points. This saves twice the memory, and the concurrent execution of point reading and sampling saves the shorter time of the two, which can effectively improve the tool processing speed.

[0052] Preferably, this tool uses non-uniform grid slicing for the top layer. In reality, point clouds are mostly not in the east-west-north direction, and there are strip point clouds, such as bridges and roads. Using non-uniform grid slicing can exclude huge blank areas, so that the bounding box of the lower slice is smaller, and the situation of just cutting a corner can be excluded, so that the number of files with very few points is reduced. Therefore, fewer files need to be loaded when displaying, which can improve the loading speed and optimize the front-end interaction effect.

[0053] Generally, the point cloud data of the top-level slice will be written into one file, and each level below has multiple files. If the slices with fewer points are not merged, there may be slice files with fewer points. Therefore, the slicing tool also provides a merging module 7 for detecting the number of point clouds in each slice of each level. If there is a slice with a point cloud number less than the first preset value, the following steps are performed:

[0054] A. A slice with a point cloud number less than a first preset value is regarded as a specific slice; the first setting may be a smaller value such as 10, 20, etc.;

[0055] B. Under the condition that the number of point clouds of the merged slice is less than the second preset value, a number of specific slices at the same level are merged and / or at least one specific slice at the same level is merged with a non-specific slice to obtain one or more merged slices. The second preset value can be a relatively large value such as 100, 200, 500, that is, in the same level, multiple specific slices, such as 2, 3, 4 slices, etc. can be merged, as long as the number of point clouds in the merged slice after merging is less than the second preset value. For convenience, to meet the merging requirements, etc., the specific slice can also be merged with a non-specific slice with a point cloud number greater than the first preset value, such as a specific slice with a point cloud number of 5 can be merged with a non-specific slice with a point cloud number of 55.

[0056] This tool merges files with fewer points. The end result is that there are fewer files (more points in the files), so fewer files need to be loaded when displaying, which can further improve the loading speed and optimize the front-end interaction effect.

[0057] Furthermore, the slicing tool homepage of the present solution provides a thinning option of whether to thin or not and a denoising option of whether to denoise or not for the user to choose, and the sampling module 4 determines whether to denoise or thin the point cloud block according to the user's selection operation.

[0058] Specifically, when the user selects denoising, noise points are screened and deleted, and when the user does not select denoising, no denoising is performed.

[0059] The sampling module 4 decomposes each point cloud block into several cubic grids according to the sampling interval. The selected sampling points are the points closest to the center of each cubic grid. When the user does not choose thinning, the unselected points are decomposed into the last layer slice below the bottom layer slice. When the user chooses thinning, the unselected points are deleted. In the process of sampling each point cloud block into layered slices, the point cloud blocks in the sampling memory are deleted to achieve one block after another processing and delete one block, thereby reducing memory consumption. The specific method is as follows: when the user does not choose thinning, for each point cloud block, its unselected points are decomposed into the last layer slice, and its selected sampling points are placed into the slice of the corresponding layer, and then the point cloud block is deleted; when the user chooses thinning, for each point cloud block, its selected points are placed into the slice of the corresponding layer, and then the point cloud block is deleted.

[0060] Specifically, the selected points are placed in the multi-layered slices from the bottom slice to the top slice. When thinning is not selected, there is a last slice below the bottom slice to store the points excluded by thinning. Here, the bottom slice is marked as layer 1 slice, and the layers above are incremented by 1, namely, layer 2 slice, layer 3 slice, and the last slice is marked as layer 0 slice. The layered slice module 5 places the selected sampling points into the slices of the corresponding layers in the following way:

[0061] First, all the selected sampling points are separated by 2 from the sampling center. x-1 The points of nm are put into the top slice, where x represents the current level, n represents the sampling interval, and m represents a natural number;

[0062] Then from the remaining sampling points, the interval between the sampling center and x-1 The points of nm are put into the second layer of slices, where x represents the current level, n represents the sampling interval, and m represents a natural number;

[0063] And so on, until the bottom slice. The sampling center is the center of all sampling points.

[0064] All selected sampling points are placed in each level in the above way. When the user requests to display, the point cloud data of the top slice is loaded and displayed first. At this time, the clarity is the lowest. When the user continuously requests to improve the clarity, the point cloud data of the next level is loaded in turn and combined with the point cloud data of the above level for display. If the user requests to load the highest clarity, the point cloud data of all levels from the bottom to the top are displayed at the same time. The sampling points are placed in slices of different levels. When the user requires a higher-definition display, the next level is loaded to supplement the current display. The duplication of the sampling point cloud in each level is almost 0, which has the advantages of small memory usage and high loading efficiency.

[0065] Furthermore, the slicing tool also includes a layer number judgment module 8, which is used to judge whether the current number of layers is appropriate after the sampling is completed. If so, the layered slicing module 5 is notified to start the layered slicing process, otherwise the interval calculation module 1 is notified to recalculate the number of layers and the sampling interval. When the selected sampling point just occupies 2 times, 4 times, 8 times... the sampling center, it is judged that the number of layers is appropriate, otherwise it is judged to be inappropriate. When put into use, assuming that the number of layers is judged to be inappropriate, and when the recalculated number of layers is 5 layers, resampling can be performed at intervals of 16 times, 8 times, 4 times, and 2 times. Since sampling has been performed once, the sampling interval and number of layers calculated this time are calculated based on the last calculation, and the second sampling can ensure that the sampling point just occupies 2 times, 4 times, 8 times... the sampling center, so this solution only needs to perform resampling once at most when resampling is required. Although in the case of resampling, the traditional method of reading first and then sampling only requires resampling, this solution requires not only resampling but also re-reading. It seems that the traditional method is more economical, but the reading time of the point cloud is less than the sampling time. This solution uses a production-consumption model and reads the point cloud simultaneously during the resampling process, so it also only requires sampling time, and will not increase the reading time. On the contrary, no additional storage space for reading is required, which can save twice the memory space.

[0066] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.

[0067] Although the present invention uses more terms such as interval calculation module 1, point cloud reading module 2, sampling module 4, layered slicing module 5, file writing module 6, merging module 7, and layer number judgment module, it does not exclude the possibility of using other terms. These terms are used only to more conveniently describe and explain the essence of the present invention; interpreting them as any additional restrictions is contrary to the spirit of the present invention.

Claims

1. A high-speed slicing method for point cloud data, characterized in that: The following steps are involved: S1. Obtain the file to be sliced ​​containing point cloud data and calculate the sampling interval; S2. The point cloud reading module (2) reads the point cloud data in the file to be sliced ​​in blocks, and directly transmits the read point cloud blocks to the sampling module (4) so ​​that the sampling module (4) and the point cloud reading module (2) are executed concurrently; S3. The sampling module (4) selects sampling points from each point cloud block according to the sampling interval; S4. Place the selected sampling points into slices of the corresponding layers respectively; S5. compress the point cloud data of each layer of slices or each layer of slices except the top layer and write them into a slice file of a specific format.

2. The high-speed slicing method of point cloud data according to claim 1, characterized in that: In step S3, after sampling is completed, it is determined whether the number of layers is appropriate. If so, the sampling points are placed in the slices of the corresponding layers. If not, the number of layers and the sampling interval are recalculated and steps S2 and S3 are repeated.

3. The high-speed slicing method of point cloud data according to claim 1, characterized in that: The top layer is sliced ​​using a non-uniform grid; In step S5, the top slice is compressed or not compressed according to the range, and the remaining slices are compressed.

4. The high-speed slicing method of point cloud data according to claim 1, characterized in that: The following steps are also included between step S4 and step S5: First, the number of point clouds in each slice of each level is detected. If there is a slice with a point cloud number less than the first preset value, the following steps are performed: A. a slice whose point cloud number is less than a first preset value is regarded as a specific slice; B. Under the condition that the number of point clouds of the merged slice is less than a second preset value, merge several specific slices at the same level and / or merge at least one specific slice at the same level with a non-specific slice to obtain one or more merged slices.

5. The high-speed slicing method for point cloud data according to any one of claims 1 to 4, characterized in that: A thinning option of whether to thin or not and a denoising option of whether to denoise or not are provided for the user to choose, and whether to perform denoising or thinning processing on the point cloud block in step S3 is determined according to the user's selection operation.

6. The high-speed slicing method of point cloud data according to claim 5, characterized in that: When the user selects denoising, the noise points are filtered and deleted. When the user does not select denoising, no denoising is performed. In step S3, the point cloud block is decomposed into several cubic grids according to the sampling interval, and the point closest to the center of each cubic grid is the selected sampling point; and when the user does not choose thinning, the unselected points are decomposed to the last slice below the bottom slice, and when the user chooses thinning, the unselected points are deleted.

7. The high-speed slicing method of point cloud data according to claim 6, characterized in that: When the user does not select thinning, for each point cloud block, its unselected points are decomposed into the last layer of slices, and its selected sampling points are placed in the slices of the corresponding layer, and then the point cloud block is deleted; When the user chooses to thin out, for each point cloud block, its selected sampling points are placed into the slice of the corresponding layer and then the point cloud block is deleted.

8. The high-speed slicing method of point cloud data according to claim 7, characterized in that: In step S4, the selected sampling points are placed in the multi-layer slices from the bottom slice to the top slice, and the selected points are placed in the slices of the corresponding layers in the following manner: First, the selected sampling points are separated from the sampling center by 2 x-1 The points of nm are put into the top slice, where x represents the current level, n represents the sampling interval, and m represents a natural number; Then from the remaining sampling points, the interval between the sampling center and x-1 The points of nm are put into the second layer of slices, where x represents the current level, n represents the sampling interval, and m represents a natural number; And so on, until the bottom layer of slices.

9. A high-speed slicing tool, characterized in that: It includes an interval calculation module (1), a point cloud reading module (2), a sampling module (4), a layered slicing module (5) and a file writing module (6), wherein: An interval calculation module (1), used for calculating the sampling interval according to the file to be sliced; A point cloud reading module (2) is used to read the point cloud data in the slice file in blocks and transmit the read point cloud blocks to the sampling module (4) so ​​that the sampling module (4) and the point cloud reading module (2) are executed concurrently; A sampling module (4) is used to select sampling points from each point cloud block received in sequence according to a sampling interval; A layered slicing module (5) is used to place the sampling points selected by the sampling module (4) into slices of the corresponding layer; The file writing module (6) is used to compress the point cloud data of each layer of slices or each layer of slices except the top layer and then write them into a slice file of a corresponding format.

10. The high-speed slicing tool according to claim 9, characterized in that: The sampling module (4) is used to perform denoising and thinning processing on the point cloud data in the point cloud block, delete the noise points, and delete or decompose the points excluded by thinning into the last slice according to the user's choice; It comprises a merging module (7) for detecting the number of point clouds in a slice and merging the slices whose number of point clouds is less than a first preset value; It comprises a layer number judgment module (8) for judging whether the current number of layers is appropriate, and notifying the interval calculation module (1) to recalculate the number of layers and sampling interval or notifying the layered slicing module (5) to start layered slicing processing according to the judgment result.

Citation Information

Patent Citations

  • Method for denoising tunnel point cloud and generating visualization model

    CN112465991A

  • Region-adaptive hierarchical transform and entropy coding for point cloud compression, and corresponding decompression

    US20170347100A1