Stable display rendering method and system for massive 3D laser point clouds

Through blocking technology and octree algorithm, the massive point cloud data of three-dimensional lasers are split and rendered, which solves the problems of rendering lag and insufficient memory when processing massive point cloud data, and realizes the stability of rendering numbers and memory memory Smooth use.

CN113947659BActive Publication Date: 2024-12-20SOUTH SURVEYING & MAPPING INSTR
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111057063.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-09
Publication Date
2024-12-20
Estimated Expiration
2041-09-09

AI Technical Summary

Technical Problem

Existing three-dimensional laser scanners can easily cause computer rendering lag, insufficient memory and system crash when processing massive point cloud data, and cannot effectively solve the problems of rendering lag and memory exhaustion.

Method used

The point cloud data is split and processed by using blocking technology, and the data is divided into several layer block files with small data volumes, and dynamically load the layer blocks to be processed according to the set number of points displayed in the point cloud during the rendering process. For files, the octree algorithm is used to determine the number of rendered points in each layer block, ensuring that the number of rendered point clouds is relatively stable and avoiding data overload.

Benefits of technology

It effectively solves the problems of computer rendering lag, memory exhaustion and insufficient GPU video memory, improves the user experience, and maintains the relatively stable state of memory and video memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113947659B_ABST
    Figure CN113947659B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for stable display and rendering of massive three-dimensional laser point clouds, which relates to the field of three-dimensional laser technology, including: using the principle of octree algorithm to split point cloud data into multiple point cloud layer blocks and store them in corresponding layer block files; judging and recording point cloud layer blocks that meet rendering conditions into rendering layer block sets; calculating the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set; and loading corresponding layer block files for rendering according to the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set. This solution uses block technology to split and process each piece of point cloud data, dividing the point cloud data into several layer block files with smaller data volumes; during the rendering process, several point cloud files with smaller data volumes that need to be processed can be dynamically loaded to maintain a relatively stable state of memory and video memory usage, effectively solving problems such as computer freezes, memory exhaustion, insufficient GPU video memory, and even system crashes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of three-dimensional laser technology, and in particular to a method and system for stably displaying and rendering a massive three-dimensional laser point cloud. Background Art

[0002] Nowadays, 3D laser scanners are becoming more and more popular, and their application scenarios are becoming more and more extensive. For example, in the surveying and mapping industry, the point cloud data output by the scanner is used to reconstruct the building in three dimensions to obtain the 3D point cloud data of the building. The 3D laser scanner needs to perform multi-station layout scanning to scan the building, so as to obtain multiple copies of point cloud data, and then perform operations such as splicing on these point cloud data to obtain the 3D point cloud data of the building. However, due to the accuracy of the scanner and other reasons, the number of points in the point cloud scanned by one station is relatively large, and the number of points can reach more than 10 million. The point cloud data of multiple stations may add up to hundreds of millions of points. The software needs to load the point cloud data of multiple stations. If no processing is done, the existing ordinary computer performance will inevitably cause the software to freeze when rendering. Moreover, as the number of stations continues to load, the situation becomes more and more serious, resulting in the inability to perform operations such as point cloud splicing, and even insufficient memory, software crashes, and a very unfriendly user experience.

[0003] The Chinese invention patent with publication number CN102693319B disclosed a pyramid-based massive laser radar point cloud storage method on September 26, 2012. By establishing a progressively encrypted pyramid data storage method, the massive point cloud data is spatially indexed by sparsely storing tiled point clouds of different densities at each layer of the pyramid. The pyramid-based point cloud data management method can realize efficient and orderly storage of massive point clouds. The actual data processing operation can adaptively load or modify the corresponding data tiles according to the needs, thereby greatly reducing the computing resources consumed in the production process. Although this method can directly improve the efficiency of spatial digital product production based on laser radar point clouds, as the point clouds of multiple stations are continuously added, the number of rendered points also increases, and it cannot effectively solve the problems of rendering jams and insufficient memory. Summary of the invention

[0004] In order to solve at least one of the above technical defects, the present invention provides a method and system for stable display rendering of three-dimensional laser massive point cloud, aiming to improve the computer's ability to render three-dimensional laser massive point cloud data and avoid the problem of memory exhaustion due to data overload.

[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0006] A method for stably displaying and rendering a massive 3D laser point cloud comprises the following steps:

[0007] S1: Read a point cloud data, split it into multiple point cloud layers using the octree algorithm principle and store them in corresponding layer files;

[0008] S2: read a layer block file;

[0009] S3: Determine whether the point cloud layer block in the layer block file is outside the current visible 3D projection view volume. If so, re-read another layer block file and repeat step S3; otherwise, record the corresponding point cloud layer block into the rendering layer block set, read another layer block file, and repeat step S3 until all point cloud layer blocks are determined;

[0010] S4: Obtain the total number of all point clouds in the rendering layer block set and the number of point clouds in each layer block in the rendering layer block set, and calculate the proportion coefficient of each layer block in the rendering layer block set;

[0011] S5: Set the total number of point cloud display points, and calculate the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set according to the scale factor;

[0012] S6: According to the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set, the corresponding layer block file is loaded for rendering until all point cloud layer blocks are rendered.

[0013] In the above scheme, the block technology is used to split and process each point cloud data, and the point cloud data is divided into several layer block files with smaller data volume without increasing the number of original point clouds; in the rendering process, according to the set total number of point cloud display points and the preset algorithm rules, several point cloud files with smaller data volume that need to be processed can be dynamically loaded, so that the current number of point cloud renderings is maintained at the set total number of point cloud display points, ensuring that the number of rendered point clouds is relatively stable, thereby maintaining a relatively stable state of memory and video memory usage, avoiding data overload, and effectively solving problems such as computer freezes, memory exhaustion, insufficient GPU video memory, and even system crashes.

[0014] In the above scheme, this method is developed in combination with existing software to improve the software's ability to render massive 3D laser point cloud data. Even if the point cloud data scanned by each site is continuously loaded, the software can minimize the lag time caused by rendering, while maintaining the use of computer memory and GPU video memory in a relatively constant state, avoiding memory exhaustion, insufficient GPU video memory, and system crashes due to data overload, thereby improving user experience.

[0015] Wherein, step S1 comprises the following steps:

[0016] S11: read a point cloud data, generate a point cloud file directory, calculate the maximum enclosing range cube of the point cloud data, and determine the maximum side length and the vertex with the smallest value of the cube;

[0017] S12: Using the principle of the octree algorithm, each point of the point cloud data is divided into unit blocks according to the vertex with the maximum side length and the smallest value, and the unit block index of each point is calculated to obtain a unit block set;

[0018] S13: Calculate the number of points of each unit block in each unit block set. If the number of points of the unit block is less than the set number of point cloud block layers, record the unit block in the point cloud block set; otherwise, record it in the candidate block set.

[0019] S14: Determine whether the candidate block set is empty, if so, execute step S17, otherwise, execute step S15;

[0020] S15: Take out a candidate block from the candidate block set, set the side length of the candidate block to be half of the side length of the unit block, divide each point of the candidate block into candidate blocks using the principle of octree algorithm, and obtain a candidate block unit set;

[0021] S16: Calculate the number of points of each candidate block in the candidate block unit set. If the number of points of the candidate block is less than the set number of point cloud block layers, record the candidate block in the point cloud block set; otherwise, record it in the candidate block set and return to step S14.

[0022] S17: Determine whether the point cloud block set is empty. If so, end the point cloud data splitting process; otherwise, execute step S18;

[0023] S18: Take out a point cloud block layer from the point cloud block set, generate a layer block file in the point cloud file directory, randomly take out a set number of point cloud small blocks from the point cloud block layer, and generate a point cloud small block file in the layer block file; loop until there are no redundant points in the point cloud block layer, and obtain multiple point cloud small files; return to execute step S17.

[0024] In step S3, the process of determining whether the point cloud layer block in the layer block file is outside the currently visible three-dimensional projection scene volume is specifically as follows:

[0025] Determine whether the enclosing range cube of the point cloud layer block in the layer block file intersects with the hexahedron of the currently visible 3D projection scene volume. If not, it is invisible and does not need to be rendered. Re-read another layer block file for judgment; if intersecting, record the corresponding point cloud layer block into the rendering layer block set.

[0026] In step S4, the number of point clouds of each point cloud layer block is obtained according to step S1, and the number of point clouds corresponding to all point cloud layer blocks in the rendering layer block set is added to obtain the total number of all point clouds in the rendering layer block set.

[0027] Wherein, step S6 specifically includes the following steps:

[0028] S61: Determine whether the rendering layer block set is empty. If so, end the rendering of the current frame; otherwise, execute step S62;

[0029] S62: according to the number of points that need to be rendered in each point cloud layer block in the rendering layer block set, the point cloud small block files that need to be loaded under each layer block file are calculated until the number of points contained in the point cloud small block files reaches the target number, and the point cloud small block files that need to be loaded are recorded;

[0030] S63: If the point cloud layer block has cached the point cloud small block file, directly render the corresponding point cloud small block file and update the number of frames used by it; otherwise, load the corresponding point cloud small block file from the hard disk for rendering;

[0031] S64: Repeat step S63 until all points in all point cloud small block files are rendered, and the rendering of the current frame ends.

[0032] The present invention also provides a 3D laser massive point cloud stable display rendering system, which is used to implement a 3D laser massive point cloud stable display rendering method, and specifically includes a point cloud data reading module, a splitting processing module, a layer block file storage module, a layer block file reading module, a rendering judgment module, a rendering layer block storage module, a point cloud number recording module, a calculation module, a point cloud display point setting module and a rendering module; wherein:

[0033] The point cloud data reading module is used to read point cloud data;

[0034] The splitting processing module splits the read point cloud data into multiple point cloud layer blocks using the octree algorithm principle;

[0035] The layer block file storage module stores the obtained multiple point cloud layer blocks as corresponding layer block files;

[0036] The layer block file reading module is used to read the layer block file;

[0037] The rendering judgment module is used to judge whether the read layer block file is outside the current visible 3D projection view volume. If so, the layer block file reading module re-reads another layer block file and re-judges; otherwise, the corresponding point cloud layer block is recorded in the rendering layer block set;

[0038] The rendering layer block storage module is used to construct and store a rendering layer block set;

[0039] The point cloud number recording module is used to record the number of point clouds in each point cloud layer block during the point cloud data splitting process by the splitting processing module, and obtain the total number of all point clouds in the rendering layer block set;

[0040] The point cloud display point setting module is used to set the total number of point cloud display points;

[0041] The calculation module is used to calculate the proportion coefficient of each layer block in the rendering layer block set and calculate the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set according to the total number of point cloud display points;

[0042] The rendering module loads the corresponding layer block file for rendering according to the number of points allowed to be rendered in each point cloud layer block in the rendering layer block set.

[0043] The splitting processing module includes a reading unit, a directory generating unit, a point cloud data calculating unit, a unit block dividing unit, a point cloud block layer number setting unit, a point cloud block set storage unit, a unit block point number judging unit, a candidate block set storage unit, a candidate block set judging unit, a candidate block dividing unit, a candidate block calculating unit, a candidate block point number judging unit, a point cloud block set judging unit and a point cloud small block file generating unit; wherein:

[0044] The reading unit is used to read point cloud data;

[0045] The directory generating unit generates a point cloud file directory according to the read point cloud data;

[0046] The point cloud data calculation unit is used to calculate the maximum enclosing range cube of the point cloud data and determine the maximum side length and the vertex with the smallest value of the cube;

[0047] The unit block division unit divides each point of the point cloud data into unit blocks according to the vertices with the largest side length and the smallest value by using the principle of the octree algorithm, calculates the unit block index of each point, and obtains the unit block set;

[0048] The point cloud block layer quantity setting unit is used to set the size of a point cloud block layer quantity;

[0049] The point cloud block set storage unit is used to construct and store the point cloud block set; the candidate block set storage unit is used to construct and store the candidate block set;

[0050] The unit block point number judgment unit is used to calculate the number of points of each unit block in each unit block set in the unit block set, and judge whether the number of unit block points is less than the set number of point cloud block layers. If so, it is recorded in the point cloud block set, otherwise, it is recorded in the candidate block set;

[0051] The candidate block set judgment unit is used to judge whether the candidate block set is empty. If so, it is processed by the point cloud block set judgment unit; otherwise, it is processed by the candidate block division unit;

[0052] The candidate block division unit determines the side length value of the candidate block according to the side length value of the unit block, and divides each point of the candidate block into candidate blocks using the principle of the octree algorithm to obtain a candidate block unit set;

[0053] The candidate block calculation unit calculates the number of points of each candidate block in the candidate block unit set;

[0054] The candidate block point number judgment unit judges whether the number of points of the candidate block is less than the set number of point cloud block layers. If so, the candidate block is recorded in the point cloud block set; otherwise, it is recorded in the candidate block set.

[0055] The point cloud block set judging unit is used to judge whether the point cloud block set is empty. If so, the point cloud data splitting process is terminated. Otherwise, the point cloud small block file generating unit is used to process it.

[0056] The point cloud small block file generation unit takes out a point cloud block layer from the point cloud block set, generates a layer block file in the point cloud file directory, randomly takes out a set number of point cloud small blocks from the point cloud block layer, and generates a point cloud small block file in the layer block file; the cycle is repeated until there are no redundant points in the point cloud block layer, and multiple point cloud small files are obtained.

[0057] Among them, in the rendering judgment module, the process of judging whether the point cloud layer block in the layer block file is outside the currently visible three-dimensional projection view volume is specifically as follows:

[0058] Determine whether the enclosing range cube of the point cloud layer block in the layer block file intersects with the hexahedron of the currently visible 3D projection scene volume. If not, it is invisible and does not need to be rendered. Re-read another layer block file for judgment; if intersecting, record the corresponding point cloud layer block into the rendering layer block set.

[0059] The rendering module includes a rendering layer block set judgment unit, a point cloud small block file recording unit, a cache unit, and a rendering unit; wherein:

[0060] The rendering layer block set judgment unit is used to judge whether the rendering layer block set is empty. If so, the rendering of the current frame is terminated; otherwise, the point cloud small block file recording unit performs processing;

[0061] The point cloud small block file recording unit calculates the point cloud small block files to be loaded under each layer block file according to the number of points to be rendered in each point cloud layer block in the rendering layer block set, until the number of points contained in the point cloud small block file reaches the target number, and records the point cloud small block files to be loaded;

[0062] The cache unit caches the recently used small point cloud files according to the updating principle;

[0063] The rendering unit loads and renders the small point cloud files that need to be loaded. If the small point cloud files have been cached in the cache unit, the corresponding small point cloud files are directly rendered and the number of frames used is updated; otherwise, the corresponding small point cloud files are loaded from the hard disk for rendering and the number of frames used is updated until all points in all small point cloud files are rendered, and the rendering of the current frame is ended.

[0064] Among them, in the cache unit, the update principle is specifically as follows: if the number of cached point cloud small block files in the cache unit does not reach the set number of retained point cloud small block files, the point cloud small block files loaded from the hard disk will be cached in the cache unit; if the number of cached point cloud small block files in the cache unit has reached the set number of retained point cloud small block files, after the point cloud small block files are loaded in the hard disk, the relationship between their usage frame number and the usage frame number of the cached point cloud small block files in the cache unit is judged. If it is greater, the point cloud small block file with the smallest usage frame number will be deleted from the cache module, and the point cloud small block file loaded from the hard disk will be cached in the cache unit; otherwise, the point cloud small block file will not be cached.

[0065] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0066] The present invention proposes a method and system for stable display and rendering of massive three-dimensional laser point clouds, which adopts a block technology to split and process each point cloud data, and divides the point cloud data into several layer block files with smaller data volumes without increasing the number of original point clouds; during the rendering process, according to the set total number of point cloud display points and in accordance with preset algorithm rules, several point cloud files with smaller data volumes that need to be processed can be dynamically loaded, so that the current number of point cloud renderings is maintained at the set total number of point cloud display points, ensuring that the number of rendered point clouds is relatively stable, thereby maintaining a relatively stable state of memory and video memory usage, avoiding data overload, and effectively solving the problems of computer freezes, memory exhaustion, GPU video memory shortage, and even system crashes. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 It is a schematic diagram of the process of the method of the present invention;

[0068] Figure 2 This is a schematic diagram of the point cloud data splitting process of the present invention;

[0069] Figure 3 This is a schematic diagram of a file directory after a point cloud data split process in one embodiment of the present invention;

[0070] Figure 4A schematic diagram of a directory containing multiple layer block files under the Data directory in one embodiment of the present invention;

[0071] Figure 5 A schematic diagram of each point cloud small block file included in a layer block file directory in one embodiment of the present invention;

[0072] Figure 6 This is a schematic diagram of the point cloud layer block rendering process of the present invention;

[0073] Figure 7 This is a schematic diagram of module connection of the system of the present invention;

[0074] Figure 8 This is a schematic diagram of the internal structure connection of the splitting processing module of the present invention;

[0075] Fig. 9 This is a schematic diagram of the internal structure connection of the rendering module of the present invention. DETAILED DESCRIPTION

[0076] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;

[0077] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;

[0078] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0079] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0080] Example 1

[0081] In actual application, users generally operate and process point cloud data as follows:

[0082] If you use input devices such as a mouse or keyboard to translate, scale, or rotate the loaded point cloud, the display rendering thread of the point cloud data will be awakened to render the next frame; if a new point cloud data is added, the point cloud data splitting process will be called to split the new point cloud data, and then the corresponding related directories of the point cloud will be recorded, and then the display rendering thread will be awakened to render the next frame.

[0083] like Figure 1 As shown, this solution specifically provides a method for stable display and rendering of 3D laser massive point clouds, including the following steps:

[0084] S1: Read a point cloud data, split it into multiple point cloud layers using the octree algorithm principle and store them in corresponding layer files;

[0085] S2: read a layer block file;

[0086] S3: Determine whether the point cloud layer block in the layer block file is outside the current visible 3D projection view volume. If so, re-read another layer block file and repeat step S3; otherwise, record the corresponding point cloud layer block into the rendering layer block set, read another layer block file, and repeat step S3 until all point cloud layer blocks are determined;

[0087] S4: Obtain the total number of all point clouds in the rendering layer block set and the number of point clouds in each layer block in the rendering layer block set, and calculate the proportional coefficient of each layer block in the rendering layer block set. The calculation formula is: scale=pieceNum / allNum, where scale represents the proportional coefficient, pieceNum represents the number of layer block points, and allNum represents the total number of set points;

[0088] S5: Set the total number of point cloud display points, and calculate the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set according to the scale factor;

[0089] S6: According to the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set, the corresponding layer block file is loaded for rendering until all point cloud layer blocks are rendered.

[0090] In the specific implementation process, the block technology is used to split and process each point cloud data. Without increasing the number of original point clouds, the point cloud data is divided into several layer block files with smaller data volume (for example, a layer block file contains at most 10,000 points); in the rendering process, according to the set total number of point cloud display points (the total number of display points is set according to the performance of its own computer), according to the preset algorithm rules, several point cloud files with smaller data volume that need to be processed can be dynamically loaded, so that the current number of point cloud renderings is maintained at the set total number of point cloud display points. Even if the user zooms, translates or imports point cloud data from more stations, the number of rendered point clouds can be guaranteed to be relatively stable, thereby maintaining a relatively stable state of memory and video memory usage, avoiding data overload, and effectively solving problems such as computer freezes, memory exhaustion, insufficient GPU video memory, and even system crashes.

[0091] In the specific implementation process, this method is developed in combination with existing software to improve the software's ability to render massive 3D laser point cloud data. Even if the point cloud data scanned by each site is continuously loaded, the software can minimize the lag time caused by rendering. At the same time, the use of computer memory and GPU video memory is maintained in a relatively constant state, avoiding memory exhaustion, insufficient GPU video memory, and system crashes due to data overload, thereby improving user experience.

[0092] More specifically, Figure 2 As shown, step S1 includes the following steps:

[0093] S11: read a point cloud data, generate a point cloud file directory, calculate the maximum enclosing range cube of the point cloud data, determine the maximum side length of the cube and the vertex with the smallest value; where the vertex with the smallest value is recorded as (minx, miny, minz), and half of the maximum side length is recorded as div;

[0094] S12: Use the octree algorithm principle to divide each point of the point cloud data into unit blocks according to the vertex with the largest side length and the smallest value, and calculate the unit block index (x i ,y i ,z i ), get the unit block set;

[0095] The calculation formula of the unit block index is as follows: i =(x-minx) / div,y i =(y-miny) / div, z i =(z-minz) / div, where x, y, z are the x, y, z coordinate values ​​of the point coordinates, and i represents the i-th point;

[0096] S13: Calculate the number of points of each unit block in each unit block set. If the number of points of the unit block is less than the set number of point cloud block layers, record the unit block in the point cloud block set; otherwise, record it in the candidate block set.

[0097] S14: Determine whether the candidate block set is empty, if so, execute step S17, otherwise, execute step S15;

[0098] S15: Take out a candidate block from the candidate block set, set the side length of the candidate block to be half of the side length of the unit block, divide each point of the candidate block into candidate blocks using the principle of octree algorithm, and obtain a candidate block unit set;

[0099] S16: Calculate the number of points of each candidate block in the candidate block unit set. If the number of points of the candidate block is less than the set number of point cloud block layers, record the candidate block in the point cloud block set; otherwise, record it in the candidate block set and return to step S14.

[0100] S17: Determine whether the point cloud block set is empty. If so, end the point cloud data splitting process; otherwise, execute step S18;

[0101] S18: Take out a point cloud block layer from the point cloud block set, generate a layer block file in the point cloud file directory, and use a normal distribution random sampling algorithm to randomly take out a set number of point cloud small blocks from the point cloud block layer, and then generate a point cloud small block file in the layer block file; loop until there are no redundant points in the point cloud block layer and obtain multiple point cloud small files; return to execute step S17.

[0102] In the specific implementation process, each point cloud data only needs to be split and processed once, and the total number of points in the point cloud after splitting remains the same as before processing, without addition or deletion, which is different from the conventional hierarchical processing method. After the splitting is completed, the corresponding directory structure is generated, such as Figure 3 As shown in the figure, the Data directory contains all the segmented point cloud file directories, such as Figure 4 As shown; the metaData.sldr file records the number of points in this point cloud data and other information for subsequent rendering processing.

[0103] In the specific implementation process, a layer block file represents a point cloud layer block. The division of each point cloud layer block of the point cloud data is based on the principle of the octree algorithm and the set point size of a point cloud block layer (for example, the number of points is set to one million). The number of points in a point cloud block layer after division does not exceed the set point cloud block layer number. A point cloud block layer directory contains multiple point cloud small block files, such as Figure 5 As shown in the figure, it represents that a point cloud block layer is composed of multiple point cloud blocks. The number of points in a point cloud block does not exceed the set number of point cloud blocks (such as 10,000). The countData.sldr file is generated in the block layer directory, which records the actual number of point clouds owned by the block layer for subsequent rendering processing.

[0104] In the specific implementation process, the point cloud block layers are different from the pyramid layered structure. In the pyramid layered structure, the data of the upper layer is based on the data of the lower layer, and there is no connection between these point cloud block layers. The purpose of splitting the point cloud layer blocks is to divide the original point cloud data using the principle of the octree algorithm. When a point cloud layer block reaches the set number of point cloud block points, the block layer will no longer be divided. Dividing into multiple point cloud block layers can speed up the subsequent rendering process (for example, when the point cloud block layer is outside the current invisible three-dimensional projection view volume, the data of the block layer does not need to be rendered), and each block layer is divided into multiple small point cloud block files, which provides the necessary technical support for subsequent rendering processing. After calculating the number of points required to render the layer block, only the appropriate number of point cloud block files need to be loaded. The splitting of point cloud data is the basis for maintaining memory stability, GPU video memory stability, and solving rendering jams.

[0105] More specifically, in step S3, the process of determining whether the point cloud layer block in the layer block file is outside the currently visible three-dimensional projection viewing volume is as follows:

[0106] Determine whether the enclosing range cube of the point cloud layer block in the layer block file intersects with the hexahedron of the currently visible 3D projection scene volume. If not, it is invisible and does not need to be rendered. Re-read another layer block file for judgment; if intersecting, record the corresponding point cloud layer block into the rendering layer block set.

[0107] More specifically, in step S4, the number of point clouds of each point cloud layer block is obtained according to step S1, and the number of point clouds corresponding to all point cloud layer blocks in the rendering layer block set is added to obtain the total number of all point clouds in the rendering layer block set.

[0108] More specifically, Figure 6 As shown, step S6 specifically includes the following steps:

[0109] S61: Determine whether the rendering layer block set is empty. If so, end the rendering of the current frame; otherwise, execute step S62;

[0110] S62: according to the number of points that need to be rendered in each point cloud layer block in the rendering layer block set, the point cloud small block files that need to be loaded under each layer block file are calculated until the number of points contained in the point cloud small block files reaches the target number, and the point cloud small block files that need to be loaded are recorded;

[0111] S63: If the point cloud layer block has cached the point cloud small block file, directly render the corresponding point cloud small block file and update the number of frames used by it; otherwise, load the corresponding point cloud small block file from the hard disk for rendering;

[0112] S64: Repeat step S63 until all points in all point cloud small block files are rendered, and the rendering of the current frame ends.

[0113] In the specific implementation process, the rendering and display process of point cloud data is the core of stable and real-time rendering and display; according to the set total number of point cloud display points (the number of display points is set according to the performance of the computer itself), if there is only one point cloud data, the set display number of the point cloud is rendered. If there are multiple point clouds, the proportion coefficient of each point cloud data to the total point cloud data is calculated, and each point cloud data is rendered with the corresponding number of points.

[0114] In the specific implementation process, multi-threading technology can be used for background rendering. When the user performs operations such as translation, zooming, and rotation, a refresh request will be sent to the rendering thread to render a new frame.

[0115] In the specific implementation process, a caching process for point cloud layer blocks is also set up, which has a similar function to the computer's high-speed cache setting. The number of point cloud blocks is retained by setting the caching process (the number is set according to the computer's own performance). When rendering, the corresponding point cloud block file is first read from the data of the caching process. If the corresponding point cloud block file does not exist in the cache, the corresponding point cloud block file is loaded from the hard disk.

[0116] In the specific implementation process, all currently loaded point cloud data are recorded. At the same time, the relevant file directory information after the point cloud data splitting process is recorded to provide a basis for how many points should be displayed in each point cloud, which is convenient for subsequent calls and monitoring.

[0117] In the specific implementation process, during the rendering process, since it is now determined whether the relevant point cloud layer blocks of each point cloud data are outside the currently visible three-dimensional projection viewing volume, the point cloud layer blocks outside the viewing volume will not participate in the rendering process. This processing method can effectively speed up the rendering speed when the user zooms to a relatively large scale.

[0118] In the specific implementation process, the purpose of rendering point cloud data is to maintain memory stability, GPU video memory stability, solve rendering jams, and achieve real-time rendering. Because all point cloud data cannot be loaded into memory, large amounts of data will lead to insufficient memory and software crashes. By setting up the cache process, rendering jams can be effectively avoided. The point cloud layer blocks that need to be rendered frequently do not need to frequently read the corresponding files from the hard disk, but read them from the cache submodule, which speeds up the rendering processing efficiency.

[0119] Example 2

[0120] More specifically, based on Example 1, Figure 7 As shown, the present solution also provides a 3D laser massive point cloud stable display rendering system, which is used to implement a 3D laser massive point cloud stable display rendering method, and specifically includes a point cloud data reading module, a splitting processing module, a layer block file storage module, a layer block file reading module, a rendering judgment module, a rendering layer block storage module, a point cloud number recording module, a calculation module, a point cloud display point setting module and a rendering module; wherein:

[0121] The point cloud data reading module is used to read point cloud data;

[0122] The splitting processing module splits the read point cloud data into multiple point cloud layer blocks using the octree algorithm principle;

[0123] The layer block file storage module stores the obtained multiple point cloud layer blocks as corresponding layer block files;

[0124] The layer block file reading module is used to read the layer block file;

[0125] The rendering judgment module is used to judge whether the read layer block file is outside the current visible 3D projection view volume. If so, the layer block file reading module re-reads another layer block file and re-judges; otherwise, the corresponding point cloud layer block is recorded in the rendering layer block set;

[0126] The rendering layer block storage module is used to construct and store a rendering layer block set;

[0127] The point cloud number recording module is used to record the number of point clouds in each point cloud layer block during the point cloud data splitting process by the splitting processing module, and obtain the total number of all point clouds in the rendering layer block set;

[0128] The point cloud display point setting module is used to set the total number of point cloud display points;

[0129] The calculation module is used to calculate the proportion coefficient of each layer block in the rendering layer block set and calculate the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set according to the total number of point cloud display points;

[0130] The rendering module loads the corresponding layer block file for rendering according to the number of points allowed to be rendered in each point cloud layer block in the rendering layer block set.

[0131] More specifically, Figure 8 As shown, the splitting processing module includes a reading unit, a directory generating unit, a point cloud data calculating unit, a unit block dividing unit, a point cloud block layer number setting unit, a point cloud block set storage unit, a unit block point number judging unit, a candidate block set storage unit, a candidate block set judging unit, a candidate block dividing unit, a candidate block calculating unit, a candidate block point number judging unit, a point cloud block set judging unit and a point cloud small block file generating unit; wherein:

[0132] The reading unit is used to read point cloud data;

[0133] The directory generating unit generates a point cloud file directory according to the read point cloud data;

[0134] The point cloud data calculation unit is used to calculate the maximum enclosing range cube of the point cloud data and determine the maximum side length and the vertex with the smallest value of the cube;

[0135] The unit block division unit divides each point of the point cloud data into unit blocks according to the vertices with the largest side length and the smallest value by using the principle of the octree algorithm, calculates the unit block index of each point, and obtains the unit block set;

[0136] The point cloud block layer quantity setting unit is used to set the size of a point cloud block layer quantity;

[0137] The point cloud block set storage unit is used to construct and store the point cloud block set; the candidate block set storage unit is used to construct and store the candidate block set;

[0138] The unit block point number judgment unit is used to calculate the number of points of each unit block in each unit block set in the unit block set, and judge whether the number of unit block points is less than the set number of point cloud block layers. If so, it is recorded in the point cloud block set, otherwise, it is recorded in the candidate block set;

[0139] The candidate block set judgment unit is used to judge whether the candidate block set is empty. If so, it is processed by the point cloud block set judgment unit; otherwise, it is processed by the candidate block division unit;

[0140] The candidate block division unit determines the side length value of the candidate block according to the side length value of the unit block, and divides each point of the candidate block into candidate blocks using the principle of the octree algorithm to obtain a candidate block unit set;

[0141] The candidate block calculation unit calculates the number of points of each candidate block in the candidate block unit set;

[0142] The candidate block point number judgment unit judges whether the number of points of the candidate block is less than the set number of point cloud block layers. If so, the candidate block is recorded in the point cloud block set; otherwise, it is recorded in the candidate block set.

[0143] The point cloud block set judging unit is used to judge whether the point cloud block set is empty. If so, the point cloud data splitting process is terminated. Otherwise, the point cloud small block file generating unit is used to process it.

[0144] The point cloud small block file generation unit takes out a point cloud block layer from the point cloud block set, generates a layer block file in the point cloud file directory, randomly takes out a set number of point cloud small blocks from the point cloud block layer, and generates a point cloud small block file in the layer block file; the cycle is repeated until there are no redundant points in the point cloud block layer, and multiple point cloud small files are obtained.

[0145] More specifically, in the rendering judgment module, the process of judging whether the point cloud layer block in the layer block file is outside the currently visible three-dimensional projection view volume is as follows:

[0146] Determine whether the enclosing range cube of the point cloud layer block in the layer block file intersects with the hexahedron of the currently visible 3D projection scene volume. If not, it is invisible and does not need to be rendered. Re-read another layer block file for judgment; if intersecting, record the corresponding point cloud layer block into the rendering layer block set.

[0147] More specifically, Fig. 9 As shown, the rendering module includes a rendering layer block set judgment unit, a point cloud small block file recording unit, a cache unit, and a rendering unit; wherein:

[0148] The rendering layer block set judgment unit is used to judge whether the rendering layer block set is empty. If so, the rendering of the current frame is terminated; otherwise, the point cloud small block file recording unit performs processing;

[0149] The point cloud small block file recording unit calculates the point cloud small block files to be loaded under each layer block file according to the number of points to be rendered in each point cloud layer block in the rendering layer block set, until the number of points contained in the point cloud small block file reaches the target number, and records the point cloud small block files to be loaded;

[0150] The cache unit caches the recently used small point cloud files according to the updating principle;

[0151] The rendering unit loads and renders the small point cloud files that need to be loaded. If the small point cloud files have been cached in the cache unit, the corresponding small point cloud files are directly rendered and the number of frames used is updated; otherwise, the corresponding small point cloud files are loaded from the hard disk for rendering and the number of frames used is updated until all points in all small point cloud files are rendered, and the rendering of the current frame is ended.

[0152] More specifically, in the cache unit, the update principle is as follows: if the number of cached point cloud small block files in the cache unit does not reach the set number of retained point cloud small block files, the point cloud small block files loaded from the hard disk will be cached in the cache unit; if the number of cached point cloud small block files in the cache unit has reached the set number of retained point cloud small block files, after the point cloud small block files are loaded from the hard disk, the relationship between their usage frame numbers and the usage frame numbers of the cached point cloud small block files in the cache unit is judged. If it is greater, the point cloud small block file with the smallest usage frame number will be deleted from the cache module, and the point cloud small block file loaded from the hard disk will be cached in the cache unit; otherwise, the point cloud small block file will not be cached.

[0153] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. Stable display and rendering method of massive 3D laser point clouds, It is characterized in that The following steps are involved: S1: Read a point cloud data, split it into multiple point cloud layers using the octree algorithm principle and store them in corresponding layer files; S2: read a layer block file; S3: Determine whether the point cloud layer block in the layer block file is outside the current visible 3D projection view volume. If so, re-read another layer block file and repeat step S3; otherwise, record the corresponding point cloud layer block into the rendering layer block set, read another layer block file, and repeat step S3 until all point cloud layer blocks are determined; S4: Obtain the total number of all point clouds in the rendering layer block set and the number of point clouds in each layer block in the rendering layer block set, and calculate the proportion coefficient of each layer block in the rendering layer block set; S5: Set the total number of point cloud display points, and calculate the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set according to the scale factor; S6: According to the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set, the corresponding layer block file is loaded for rendering until all point cloud layer blocks are rendered.

2. The method for stable display and rendering of 3D laser massive point clouds according to claim 1, It is characterized in that Step S1 includes the following steps: S11: read a point cloud data, generate a point cloud file directory, calculate the maximum enclosing range cube of the point cloud data, and determine the maximum side length and the vertex with the smallest value of the cube; S12: Using the principle of the octree algorithm, each point of the point cloud data is divided into unit blocks according to the vertex with the maximum side length and the smallest value, and the unit block index of each point is calculated to obtain a unit block set; S13: Calculate the number of points of each unit block in each unit block set. If the number of points of the unit block is less than the set number of point cloud block layers, record the unit block in the point cloud block set; otherwise, record it in the candidate block set. S14: Determine whether the candidate block set is empty, if so, execute step S17, otherwise, execute step S15; S15: Take out a candidate block from the candidate block set, set the side length of the candidate block to be half of the side length of the unit block, divide each point of the candidate block into candidate blocks using the principle of octree algorithm, and obtain a candidate block unit set; S16: Calculate the number of points of each candidate block in the candidate block unit set. If the number of points of the candidate block is less than the set number of point cloud block layers, record the candidate block in the point cloud block set; otherwise, record it in the candidate block set and return to step S14. S17: Determine whether the point cloud block set is empty. If so, end the point cloud data splitting process; otherwise, execute step S18; S18: Take out a point cloud block layer from the point cloud block set, generate a layer block file in the point cloud file directory, randomly take out a set number of point cloud small blocks from the point cloud block layer, and generate a point cloud small block file in the layer block file; loop until there are no redundant points in the point cloud block layer, and obtain multiple point cloud small files; return to execute step S17.

3. The method for stable display and rendering of 3D laser massive point clouds according to claim 2, It is characterized in that In step S3, the process of determining whether the point cloud layer block in the layer block file is outside the currently visible three-dimensional projection scene volume is specifically as follows: Determine whether the enclosing range cube of the point cloud layer block in the layer block file intersects with the hexahedron of the currently visible 3D projection scene volume. If not, it is not visible and does not need to be rendered. Re-read another layer block file for determination. If they intersect, the corresponding point cloud layer block will be recorded in the rendering layer block set.

4. The method for stable display and rendering of 3D laser massive point clouds according to claim 2, It is characterized in that In step S4, the number of point clouds of each point cloud layer block is obtained according to step S1, and the number of point clouds corresponding to all point cloud layer blocks in the rendering layer block set is added to obtain the total number of all point clouds in the rendering layer block set.

5. The method for stable display and rendering of 3D laser massive point clouds according to claim 2, It is characterized in that Step S6 specifically includes the following steps: S61: Determine whether the rendering layer block set is empty. If so, end the rendering of the current frame; otherwise, execute step S62; S62: according to the number of points that need to be rendered in each point cloud layer block in the rendering layer block set, the point cloud small block files that need to be loaded under each layer block file are calculated until the number of points contained in the point cloud small block files reaches the target number, and the point cloud small block files that need to be loaded are recorded; S63: If the point cloud layer block has cached the point cloud small block file, directly render the corresponding point cloud small block file and update the number of frames used by it; otherwise, load the corresponding point cloud small block file from the hard disk for rendering; S64: Repeat step S63 until all points in all point cloud small block files are rendered, and the rendering of the current frame ends.

6. 3D laser massive point cloud stable display rendering system, It is characterized in that It includes a point cloud data reading module, a splitting processing module, a layer block file storage module, a layer block file reading module, a rendering judgment module, a rendering layer block storage module, a point cloud number recording module, a calculation module, a point cloud display point setting module and a rendering module; wherein: The point cloud data reading module is used to read point cloud data; The splitting processing module splits the read point cloud data into multiple point cloud layer blocks using the octree algorithm principle; The layer block file storage module stores the obtained multiple point cloud layer blocks as corresponding layer block files; The layer block file reading module is used to read the layer block file; The rendering judgment module is used to judge whether the read layer block file is outside the current visible 3D projection view volume. If so, the layer block file reading module re-reads another layer block file and re-judges; otherwise, the corresponding point cloud layer block is recorded in the rendering layer block set; The rendering layer block storage module is used to construct and store a rendering layer block set; The point cloud number recording module is used to record the number of point clouds in each point cloud layer block during the point cloud data splitting process of the splitting processing module, and obtain the total number of all point clouds in the rendering layer block set; The point cloud display point setting module is used to set the total number of point cloud display points; The calculation module is used to calculate the proportion coefficient of each layer block in the rendering layer block set and calculate the number of points allowed to be rendered for each point cloud layer block in the rendering layer block set according to the total number of point cloud display points; The rendering module loads the corresponding layer block file for rendering according to the number of points allowed to be rendered in each point cloud layer block in the rendering layer block set.

7. The three-dimensional laser massive point cloud stable display rendering system according to claim 6, It is characterized in that The splitting processing module includes a reading unit, a directory generating unit, a point cloud data calculating unit, a unit block dividing unit, a point cloud block layer number setting unit, a point cloud block set storage unit, a unit block point number judging unit, a candidate block set storage unit, a candidate block set judging unit, a candidate block dividing unit, a candidate block calculating unit, a candidate block point number judging unit, a point cloud block set judging unit and a point cloud small block file generating unit; wherein: The reading unit is used to read point cloud data; The directory generating unit generates a point cloud file directory according to the read point cloud data; The point cloud data calculation unit is used to calculate the maximum enclosing range cube of the point cloud data and determine the maximum side length and the vertex with the smallest value of the cube; The unit block division unit divides each point of the point cloud data into unit blocks according to the vertices with the largest side length and the smallest value by using the principle of the octree algorithm, calculates the unit block index of each point, and obtains the unit block set; The point cloud block layer quantity setting unit is used to set the size of a point cloud block layer quantity; The point cloud block set storage unit is used to construct and store the point cloud block set; the candidate block set storage unit is used to construct and store the candidate block set; The unit block point number judgment unit is used to calculate the number of points of each unit block in each unit block set in the unit block set, and judge whether the number of unit block points is less than the set number of point cloud block layers. If so, it is recorded in the point cloud block set, otherwise, it is recorded in the candidate block set; The candidate block set judgment unit is used to judge whether the candidate block set is empty. If so, it is processed by the point cloud block set judgment unit; otherwise, it is processed by the candidate block division unit; The candidate block division unit determines the side length value of the candidate block according to the side length value of the unit block, and divides each point of the candidate block into candidate blocks using the principle of the octree algorithm to obtain a candidate block unit set; The candidate block calculation unit calculates the number of points of each candidate block in the candidate block unit set; The candidate block point number judgment unit judges whether the number of points of the candidate block is less than the set number of point cloud block layers. If so, the candidate block is recorded in the point cloud block set; otherwise, it is recorded in the candidate block set. The point cloud block set judging unit is used to judge whether the point cloud block set is empty. If so, the point cloud data splitting process is terminated. Otherwise, the point cloud small block file generating unit is used to process it. The point cloud small block file generation unit takes out a point cloud block layer from the point cloud block set, generates a layer block file in the point cloud file directory, randomly takes out a set number of point cloud small blocks from the point cloud block layer, and generates a point cloud small block file in the layer block file; the cycle is repeated until there are no redundant points in the point cloud block layer, and multiple point cloud small files are obtained.

8. The three-dimensional laser massive point cloud stable display rendering system according to claim 7, It is characterized in that In the rendering judgment module, the process of judging whether the point cloud layer block in the layer block file is outside the currently visible 3D projection view volume is as follows: Determine whether the enclosing range cube of the point cloud layer block in the layer block file intersects with the hexahedron of the currently visible 3D projection scene volume. If not, it is not visible and does not need to be rendered. Re-read another layer block file for determination. If they intersect, the corresponding point cloud layer block will be recorded in the rendering layer block set.

9. The three-dimensional laser massive point cloud stable display rendering system according to claim 7, It is characterized in that The rendering module includes a rendering layer block set judgment unit, a point cloud small block file recording unit, a cache unit, and a rendering unit; wherein: The rendering layer block set judgment unit is used to judge whether the rendering layer block set is empty. If so, the rendering of the current frame is terminated; otherwise, the point cloud small block file recording unit performs processing; The point cloud small block file recording unit calculates the point cloud small block files to be loaded under each layer block file according to the number of points to be rendered in each point cloud layer block in the rendering layer block set, until the number of points contained in the point cloud small block file reaches the target number, and records the point cloud small block files to be loaded; The cache unit caches the recently used small point cloud files according to the updating principle; The rendering unit loads and renders the small point cloud files that need to be loaded. If the small point cloud files have been cached in the cache unit, the corresponding small point cloud files are directly rendered and the number of frames used is updated; otherwise, the corresponding small point cloud files are loaded from the hard disk for rendering and the number of frames used is updated until all points in all small point cloud files are rendered, and the rendering of the current frame is ended.

10. The three-dimensional laser massive point cloud stable display rendering system according to claim 9, It is characterized in that In the cache unit, the specific updating principle is that if the number of cached point cloud small block files in the cache unit does not reach the set number of retained point cloud small block files, the point cloud small block files loaded from the hard disk will be cached in the cache unit; if the number of cached point cloud small block files in the cache unit has reached the set number of retained point cloud small block files, after the point cloud small block files are loaded from the hard disk, the relationship between their usage frame number and the usage frame number of the cached point cloud small block files in the cache unit is judged. If it is greater, the point cloud small block file with the smallest usage frame number will be deleted from the cache module, and the point cloud small block file loaded from the hard disk will be cached in the cache unit; otherwise, the point cloud small block file will not be cached.

Citation Information

Patent Citations

  • A pyramid-based method for storing massive LiDAR point clouds.

    CN102693319B

  • Storage and real-time visualization implementation method of mass cloud data

    CN101615191A

  • A fast loading and displaying method for massive point cloud data

    CN109410118A