Point Cloud Visualization Optimization Method, System, Electronic Device and Storage Medium
By adopting tree structure and sparse rendering technology on mobile devices, the problem of point cloud data display lag caused by insufficient mobile device resources is solved, and efficient point cloud visualization is achieved.
Patent Information
- Application Number
- CN202210346597.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-31
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2042-03-31
AI Technical Summary
Due to limited memory and CPU resources, mobile devices such as mobile phones and tablets cannot support the continuous growth of massive point cloud data, resulting in data loading failure or browsing operations being stuttered.
A tree-like structure is used to store point cloud blocks, each block is divided into multiple tile levels. The terminal determines the tile point cloud to be loaded based on the distance between the current viewpoint and the point cloud block, and renders it. Combined with the dilution rendering technology, the amount of data is reduced.
It realizes real-time detailed display of point clouds on mobile devices, while reducing data caches, avoiding load failures and lags in browsing operations.
Smart Images

Figure CN114693875B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a method, a system, an electronic device, and a storage medium for optimizing point cloud visualization. Background Art
[0002] Point cloud data, referred to as point cloud for short, refers to a set of adjacent collections in a three-dimensional coordinate system. In addition to having geometric positions, some point cloud data also has color information or reflection intensity information. Since point cloud data has spatial coordinates, it is widely used in fields such as surveying and mapping, electric power, construction, industry, automobiles, games, and criminal investigation.
[0003] When using point cloud data, the point cloud data is generally visually displayed. There is generally a large amount of point cloud data, and the real-time display of a large amount of point cloud data is incremental point cloud visualization, and the data stream often continues to grow. However, the memory, CPU, and other resources of mobile devices such as mobile phones and tablets are limited and cannot support the continuous growth display of the amount of point cloud data. In view of the above defects, currently, the point cloud data is displayed by setting a thinning coefficient according to the zoom level. However, this method has high requirements for the resource performance of the device and is prone to data loading failures or browsing operation lags due to insufficient device resources. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, a system, an electronic device, and a storage medium for optimizing point cloud visualization, which can improve the problem that the current point cloud data display method is prone to data loading failures or browsing operation lags due to insufficient resources of the terminal device.
[0005] In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present invention are as follows.
[0006] In the first aspect, an embodiment of the present invention provides a method for optimizing point cloud visualization, adopting the following technical solutions.
[0007] A method for optimizing point cloud visualization, which is applied to a terminal. The terminal is communicatively connected to a server, and the server is communicatively connected to a collection device. The server stores point cloud blocks generated by the collection device in a tree structure. The method includes:
[0008] Obtaining the current view point in real time, and determining target point cloud blocks that fall within the display range of the terminal according to the current view point; wherein, each of the point cloud blocks is divided into multiple tile levels in a tree structure, and each tile level includes multiple tile point clouds;
[0009] Calculating the distance between the current view point and each of the target point cloud blocks;
[0010] For each of the target point cloud blocks, determining whether the distance is less than a thinning threshold;
[0011] If so, calculate the tile level in the target point cloud block that matches the distance, determine the tile point cloud to be loaded in the target point cloud block based on the tile level, obtain the tile point cloud to be loaded from the server and load and render it.
[0012] Furthermore, the step of calculating the tile level in the target point cloud block that matches the distance includes:
[0013] Calculating a thinning ratio according to the resolution of the terminal and a set data threshold;
[0014] Taking the product of the thinning ratio and the thinning threshold as a rendering value;
[0015] Calculating a quotient between the rendering value and the distance;
[0016] The quotient is corrected and then rounded down to obtain a tile level that matches the distance.
[0017] Furthermore, the step of determining the tile point cloud to be loaded of the target point cloud block based on the tile level includes:
[0018] Determine each tile point cloud at the tile level where the target point cloud block is located;
[0019] Obtain a bounding box of each of the tile point clouds, and determine whether the area represented by the bounding box falls within the display range of the terminal. If not, remove the tile point cloud corresponding to the bounding box to determine the tile point cloud to be loaded.
[0020] Furthermore, after the step of obtaining the tile point cloud to be loaded from the server and rendering it, the method further includes:
[0021] Calculate the amount of point cloud data loaded by the terminal. If the amount of point cloud data is greater than the set data threshold, delete the loaded tile point clouds to be loaded one by one in order from the lowest to the highest tile level until the amount of point cloud data loaded by the terminal is less than the data threshold.
[0022] Furthermore, after the step of determining, for each target point cloud block, whether the distance is less than a thinning threshold, the method further includes:
[0023] If so, the target point cloud block is rendered sparsely.
[0024] Furthermore, the step of performing sparse rendering on the target point cloud block includes:
[0025] Use the product of the downsampling threshold and a set limit multiple as the limit value, and determine whether the distance is greater than the limit value. If not, calculate the downsampling multiple that matches the distance.
[0026] Extract the zeroth-layer tile point cloud of the target point cloud block in the server according to the downsampling multiple to obtain the point cloud to be loaded, and load and render the point cloud to be loaded.
[0027] Furthermore, the method further includes:
[0028] If the distance is greater than the limit value, extract the zeroth-layer tile point cloud of the target point cloud block in the server according to a preset maximum downsampling multiple to obtain the point cloud to be loaded, and load and render the point cloud to be loaded.
[0029] Furthermore, the step of calculating the downsampling multiple that matches the distance includes:
[0030] Calculate the downsampling ratio according to the resolution of the terminal and a set data threshold.
[0031] Use the product of the downsampling ratio and the downsampling threshold as the rendering value.
[0032] Calculate the quotient of the distance and the rendering value, and round up the quotient to obtain the downsampling multiple.
[0033] Furthermore, after the step of downsampling and rendering the target point cloud block, the method further includes:
[0034] Calculate the amount of point cloud data already loaded by the terminal. If the amount of point cloud data is greater than the set data threshold, delete the already loaded point cloud data sequentially in the order from the earliest loading time to the latest loading time until the amount of point cloud data loaded by the terminal is less than the data threshold.
[0035] Furthermore, the step of calculating the distance between the current viewing point and each target point cloud block includes:
[0036] Obtain the point cloud information of each target point cloud block from the server, and determine the center point coordinates of each target point cloud block based on the point cloud information.
[0037] Calculate the distance between the current viewing point and each center point coordinate to obtain the distance between the current viewing point and each target point cloud block.
[0038] Furthermore, the step of determining the center point coordinates of each target point cloud block based on the point cloud information includes:
[0039] Extract the bounding box of each target point cloud block from the point cloud information of the target point cloud block, and use the center point coordinates of the bounding box as the center point coordinates of the target point cloud block.
[0040] In a second aspect, an embodiment of the present invention provides a method for optimizing point cloud visualization, adopting the following technical solution.
[0041] A point cloud visualization method is applied to a server, and the server is communicatively connected to a terminal and a collection device. The method includes:
[0042] Receiving point cloud blocks uploaded by the collection device in real time;
[0043] Dividing the point cloud blocks into multiple tile levels according to a tree structure and storing them in a database; wherein, each tile level includes multiple tile point clouds;
[0044] Receiving a first request sent by the terminal, calculating the point cloud information of each target point cloud block in the first request, and sending the point cloud information to the terminal, receiving a second request sent by the terminal, and returning the point clouds to be loaded of each target point cloud block to the terminal according to the second request, so as to prompt the terminal to implement the point cloud visualization optimization method as described in the first aspect.
[0045] Further, the method further includes:
[0046] Recording the identification information of the point cloud block in an index file;
[0047] Traversing the index file in real time, determining whether there is new data. If so, obtaining the new point cloud block corresponding to the new data according to the identification information of the new data;
[0048] Loading the new point cloud block, calculating and storing the point cloud information of the new point cloud block.
[0049] In a third aspect, the present invention provides a point cloud visualization optimization system, adopting the following technical solution.
[0050] A point cloud visualization optimization system includes a terminal, a server, and a collection device. The server is communicatively connected to the terminal and the collection device;
[0051] The collection device is used to generate point cloud blocks of an object to be surveyed;
[0052] The server is used to implement the point cloud visualization optimization method as described in the second aspect;
[0053] The terminal is used to implement the point cloud visualization optimization method as described in the first aspect.
[0054] Fourthly, an embodiment of the present invention provides an electronic device, adopting the following technical solution.
[0055] An electronic device includes a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the point cloud visualization optimization method as described in the first aspect or the point cloud visualization optimization method as described in the second aspect.
[0056] Fifthly, the present invention provides a storage medium, adopting the following technical solution.
[0057] A storage medium stores a computer program thereon. When the computer program is executed by a processor, it implements the point cloud visualization optimization method as described in the first aspect or the point cloud visualization optimization method as described in the second aspect.
[0058] In the point cloud visualization optimization method, system, electronic device, and storage medium provided by the embodiments of the present invention, the server stores multiple point cloud blocks in a tree structure, and each point cloud block is divided into multiple tile levels. Each tile level includes multiple tile point clouds. The terminal determines a target point cloud block through the current viewpoint, calculates the distance between each target point cloud block and the current viewpoint, and thus for the target point cloud block with a distance less than the thinning threshold, obtains the tile level that matches the distance in the target point cloud block, and then determines the tile point cloud to be loaded according to the tile level, and loads the tile point cloud to be loaded for rendering, realizing different ways of rendering for each target point cloud block according to the distance relationship between the target point cloud block and the current viewpoint. The smaller the distance, the more detailed the display. Thus, when performing detailed display, the amount of data cached by the terminal can also be reduced, and further, the problem of loading failure or browsing operation jamming caused by insufficient resources can be improved.
[0059] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following specific preferred embodiments are given, and in conjunction with the accompanying drawings, the detailed description is as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0061] Figure 1 The block diagram showing the point cloud visualization optimization system provided by the embodiments of the present invention is shown.
[0062] Figure 2FIG. 0 shows one of the flow diagrams of the point cloud visualization optimization method applied to a terminal provided by an embodiment of the present invention.
[0063] Figure 3 FIG. 4 shows another flow diagram of the point cloud visualization optimization method applied to a terminal provided by an embodiment of the present invention.
[0064] Figure 4 Shows Figure 2 Or Figure 3 a flow diagram of some sub-steps of step S103 in
[0065] Figure 5 Shows Figure 2 Or Figure 3 a flow diagram of some sub-steps of step S107 in
[0066] Figure 6 FIG. 24 shows a third flow diagram of the point cloud visualization optimization method applied to a terminal provided by an embodiment of the present invention.
[0067] Figure 7 Shows the above Figure 3 Or Figure 6 a flow diagram of some sub-steps of step S109 in
[0068] Figure 8 Shows Figure 7 a flow diagram of some sub-steps of step S109-5 in
[0069] Figure 9 FIG. 42 shows a fourth flow diagram of the point cloud visualization optimization method applied to a terminal provided by an embodiment of the present invention.
[0070] Figure 10 FIG. 46 shows a flow diagram of the point cloud visualization optimization method applied to a server provided by an embodiment of the present invention.
[0071] Figure 11 FIG. 50 shows a block diagram of an electronic device for implementing the point cloud visualization optimization method applied to a terminal or a server provided by an embodiment of the present invention.
[0072] Icons: 100 - point cloud visualization system; 110 - terminal; 120 - server; 130 - acquisition device; 140 - electronic device. Detailed Embodiments
[0073] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Usually, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0074] Accordingly, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts fall within the scope of protection of the present invention.
[0075] It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0076] A large amount of point cloud data is displayed in real time as incremental point cloud visualization, and the data stream often continues to grow. However, resources such as memory and CPU of mobile devices such as mobile phones and tablets are limited and cannot support the continuous growth display of the amount of point cloud data.
[0077] Taking the V8 engine as an example, the available memory of a 32-bit machine is about 0.7GB, and that of a 64-bit machine is about 1.4GB. However, rendering a complete point cloud data of 1 Billion without RGB information requires more than 22GB of memory for storage (for JavaScript with only double data, its calculation is that each point requires three points of X, Y, and Z, that is, 3×8 bytes of memory is required to store each point, and about 22.35GB for 1 Billion point clouds).
[0078] In view of the above defects, many methods for displaying point cloud data have been proposed. Some methods perform thinning processing on a large amount of real-time point cloud data in advance by setting a thinning coefficient to compress the data volume, and then transmit the compressed point cloud data to the device for real-time loading and display. Some methods directly load all real-time point cloud data into the memory by the device, and then set the thinning coefficient according to the zoom level for display.
[0079] However, in the B / S architecture, since point cloud resources need to be transmitted over the network, if the complete point cloud data is directly transmitted, the user device (i.e., the terminal) needs to spend a large amount of waiting time before the rendering calculation starts. Moreover, when the number of point cloud blocks (i.e., point cloud data blocks) is reduced too much to a certain extent, the number of points to be loaded exceeds the tolerance of the browser, which may cause some point cloud blocks not to be loaded and rendered or the browser to crash.
[0080] Therefore, these above methods have problems such as poor detail display effect, or easy data loading failure or browsing operation lag due to insufficient device resources.
[0081] Based on the above considerations, the embodiments of the present invention provide a point cloud visualization optimization solution, which can realize real-time detailed display of the point cloud while reducing the data cache volume on the device, so as to improve the problems existing in the current point cloud display methods, such as poor detail display effect, or easy data loading failure or browsing operation lag due to insufficient device resources.
[0082] The point cloud visualization optimization method provided by the embodiments of the present invention can be applied to an application environment as Figure 1 shown. The point cloud visualization method is applied to a point cloud visualization system 100. The point cloud visualization system 100 includes terminals 110, a server 120, and a collection device 130. There can be multiple terminals 110 and collection devices 130, and the server 120 can be communicatively connected to the terminals 110 and the collection device 130 through a network.
[0083] The collection device 130 is used to generate point cloud blocks of the object to be surveyed.
[0084] Among them, the collection device 130 can be generated based on the images collected by the imaging device, or can be the point cloud data generated based on the radar device.
[0085] The server 120 is used to receive the point cloud blocks uploaded by the collection device 130 in real time, divide the point cloud blocks into multiple tile levels in a tree structure and store them in the database, and is also used to receive the first request sent by the terminal 110, calculate the point cloud information of each target point cloud block in the first request, and send the point cloud information to the terminal 110, and receive the second request sent by the terminal 110, and return the point cloud to be loaded of each target point cloud block to the terminal 110 according to the second request, that is, to implement the point cloud visualization optimization method applied to the server provided by the embodiments of the present invention.
[0086] Among them, each tile level includes multiple tile point clouds. The point cloud block refers to the point cloud data block. The point cloud information can include but is not limited to the bounding box, or the bounding box can be represented by other features characterizing the position range of the point cloud block.
[0087] The terminal 110 is used to implement a point cloud visualization optimization method for a terminal provided in an embodiment of the present invention.
[0088] Through the combined action of the server 120, the terminal 110, and the acquisition device 130, the server 120 stores multiple point cloud blocks in a tree structure, and each point cloud block is divided into multiple tile levels, and each tile level includes multiple tile point clouds. The terminal 110 determines the target point cloud block through the current view point, calculates the distance between each target point cloud block and the current view point based on the point cloud information of each target point cloud block obtained from the server 120. Furthermore, for the target point cloud blocks with a distance less than the thinning threshold, the terminal 110 obtains the tile level in the target point cloud block that matches the distance, determines the tile point cloud to be loaded according to the tile level, and then obtains the tile point cloud to be loaded from the server 120 and performs rendering.
[0089] Among them, the terminal 110 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices, and the server 120 can be implemented by an independent server 120 or a server 120 cluster composed of multiple servers 120.
[0090] In one embodiment, as Figure 2 shown, a point cloud visualization optimization method (i.e., the first point cloud visualization optimization method in the above text) is provided. This embodiment mainly takes this method applied to Figure 1 the terminal 110 in
[0091] S101, obtain the current view point in real time, and determine the target point cloud block that falls within the display range of the terminal according to the current view point.
[0092] Among them, the current view point refers to the coordinates of the camera on the terminal 110. This camera refers to the virtual camera that determines the center of the view when the terminal displays electronic maps such as virtual maps and game maps. This camera is used to observe the point cloud display and determines the center view and display range of the point cloud display. The current view point corresponds to a specific orientation in the real scene.
[0093] The point cloud block is a point data block of a certain surveying and mapping object. Therefore, the point cloud block and its corresponding surveying and mapping object have the same area range.
[0094] When the current view point and the display range of the terminal 110 are known, the target point cloud block that falls within this display range can be determined. After the terminal 110 determines the target point cloud block, it sends a first request to the server 120, and the server 120 responds to the first request and returns the point cloud information of each target point cloud block.
[0095] S103, calculate the distance between the current view point and each target point cloud block.
[0096] After the terminal 110 determines the target point cloud block, it calculates the distance between the current view point and each target point cloud block according to the point cloud information.
[0097] The method for calculating the distance between the current view point and the target point cloud block can be flexibly selected. For example, the distance can be calculated based on the central coordinates of the target point cloud block, or the distance can be calculated based on the bounding box.
[0098] S105. For each target point cloud block, determine whether the distance is less than the thinning threshold. If so, execute S107.
[0099] Among them, the method for obtaining the thinning threshold can be flexibly selected. For example, it can be set according to historical experience data, or it can be calculated according to preset rules.
[0100] In one implementation, the thinning threshold in step S105 is implemented through the following steps: Calculate the thinning threshold according to the resolution of the terminal 110.
[0101] For the convenience of understanding, in one possible implementation, the thinning threshold can be calculated according to the resolution of the terminal 110 in the following way: Based on the width of the resolution of the terminal 110, use the thinning threshold calculation formula to calculate the thinning threshold.
[0102] The thinning threshold calculation formula may include: Among them, H represents the thinning threshold, and w represents the width of the resolution of the screen of the terminal 110. It should be noted that the parameter "180*60" in the thinning threshold calculation formula can be adaptively adjusted according to the actual parameters of the terminal 110.
[0103] The thinning threshold is obtained according to the width of the screen resolution of the terminal 110, and the rendering method is determined according to the thinning threshold, so that the rendering method is more adapted to the actual performance of the terminal 110.
[0104] S107. Calculate the tile level that matches the distance in the target point cloud block, determine the tile point cloud to be loaded of the target point cloud block based on the tile level, and obtain and load and render the tile point cloud to be loaded from the server.
[0105] After the terminal 110 determines the tile point cloud to be loaded, it sends a second request to the server 120. The server 120 responds to the second request and returns the tile point cloud to be loaded. The terminal 110 loads and renders the tile point cloud to be loaded returned by the terminal 110.
[0106] Each point cloud block includes multiple tile levels. The lower the tile level, the larger the range of the tile point cloud, the fewer the number of tile point clouds, and the sparser the point cloud data; the higher the tile level, the smaller the range of the tile point cloud, the more the number of tile point clouds, and the more detailed the point cloud data.
[0107] For example, the first tile level has one tile point cloud, the second tile level has eight tile point clouds, and the range of the eight tile point clouds of the second tile level is added up to the range of the tile point cloud of the first tile level.
[0108] It should be noted that in the point cloud block of the tree structure, there may be tiles without point cloud data in multiple tile point clouds of each tile level, that is, there is no point cloud data in the range corresponding to the tile, and such tiles are considered non-existent. Due to the existence of such tiles, the number of tile point clouds in some outer levels is less than the number of divisions. For example, when the tree structure is an octree structure, the number of tile point clouds in some tile levels may be less than 8.
[0109] In the above point cloud visualization optimization method, different rendering methods are implemented for each target point cloud block according to the distance relationship between the target point cloud block and the current viewpoint. The smaller the distance, the more detailed the display. The farther the distance, the less point cloud data is loaded. Therefore, when displaying details, the amount of data cached by the terminal 110 can be reduced, thereby improving the problem of loading failure or browsing operation jamming due to insufficient resources. At the same time, the target point cloud block whose distance from the current viewpoint is less than the thinning threshold is rendered in a tile-level rendering manner to achieve real-time point cloud detail display.
[0110] Further, in order to reduce the amount of data processing by the terminal 110 and to maximize the point cloud display range, please refer to Figure 3 The point cloud visualization optimization method provided by the embodiment of the present invention may further include step S109, which is executed after it is determined in step S105 that the distance is not less than the thinning threshold.
[0111] S109, performing sparse rendering on the target point cloud block.
[0112] When the distance between the target point cloud block and the current viewpoint exceeds or equals the thinning threshold, the target point cloud block is thinned and rendered.
[0113] Performing sparse rendering can reduce the amount of data processing by the terminal 110 as much as possible and reduce resource usage.
[0114] In this embodiment, the tree structure adopts an octree structure, that is, the point cloud blocks are stored in the server 120 according to the octree structure. Each point cloud block may include a zeroth tile level, a first tile level, a second tile level, ..., an nth tile level, and the smaller the number, the lower the level.
[0115] An octree is a tree - shaped data structure used to describe three - dimensional space. Each node of the octree represents a cubic volume element. Each node has eight child nodes, and the sum of the volume elements represented by the eight child nodes is equal to the volume of the parent node. Octrees are used in three - dimensional scene management, which can quickly determine the position of an object in a three - dimensional scene, detect whether there is a collision with other objects, and whether it is within the visible range.
[0116] Every time server 120 obtains a point cloud block, it obtains the area where the point cloud block is located (which can also be said to be the area corresponding to the point cloud block), and assigns a uniquely corresponding identifier to the point cloud block. On this basis, step S101 can be implemented through the following steps: The terminal 110 obtains the target range according to the current viewpoint and the display range of the terminal 110, and sends an information request to the server 120. In response to the information request, the server 120 sends point cloud block information to the terminal 110. The point cloud block information includes the area where each point cloud block is located. The terminal 110 determines the target point cloud blocks that fall within the target range according to the point cloud block information, and the terminal 110 sends a first request to the server 120. The first request includes the identifiers of each target point cloud block. The server 120 calculates the point cloud information of each target point cloud block according to the identifiers in the first request, and sends the characteristic cloud information to the terminal 110.
[0117] Step S101 can also be implemented through the following steps: The terminal 110 determines the target range according to the current viewpoint and the display range of the terminal 110, and loads the target range into the first request, and sends the first request to the server 120. After receiving the first request, the server 120 determines the target point cloud blocks that fall within the target range according to the target range, calculates the point cloud information of all target point cloud blocks, and returns all the point cloud information to the terminal 110.
[0118] It should be noted that the target range refers to the actual range of the real world corresponding to the display range. The point cloud information of the target point cloud block includes the bounding box. The bounding box is an algorithm for solving the optimal bounding space of a discrete point set, which uses a geometric body with a slightly larger volume and simple characteristics (called the bounding box) to approximately replace complex geometric objects. Therefore, the bounding box can be used to characterize the position range of the point cloud block.
[0119] Moreover, the bounding box can be replaced by any other feature that can characterize the position range of the point cloud block.
[0120] In one implementation, referring to Figure 4 , it is a schematic flowchart of some sub - steps of the above - mentioned step S103, including the following sub - steps.
[0121] S103 - 1, obtain the point cloud information of each target point cloud block from the server, and determine the center point coordinates of each target point cloud block based on the point cloud information.
[0122] The terminal 110 sends a first request to the server 120, and the server 120 returns point cloud information to the terminal 110 in response to the first request. The terminal 110 determines the center point coordinates of the target point cloud block according to the point cloud information.
[0123] In this embodiment, the center point coordinates of each target point cloud block can be determined based on the point cloud information in the following manner: extract the bounding box of the target point cloud block from the point cloud information of each target point cloud block, and use the center point coordinates of the bounding box as the center point coordinates of the target point cloud block.
[0124] S103-2, calculate the distance between the current viewing point and each center point coordinate to obtain the distance between the current viewing point and each target point cloud block.
[0125] Among them, calculation methods such as Euclidean distance or Mahalanobis distance can be used to calculate the distance between the target point cloud block and the current viewing point.
[0126] Since the bounding box is a geometric body with simple characteristics, when the server 120 calculates the bounding box, the coordinates of the bounding box can be obtained. After the server 120 obtains the coordinates of the bounding box, the bounding box coordinates can be stored in the following format: {min:[x1,y1,z1],max:[x2,y2,z2]}, where min:[x1,y1,z1] represents the minimum coordinates of the bounding box, and max:[x2,y2,z2] represents the maximum coordinates of the bounding box. The information returned by the server 120 in response to the first request sent by the terminal 110 includes the coordinates of the bounding box.
[0127] In one embodiment, the center point coordinates of the bounding box can be achieved through the following steps: calculate the center point coordinates P(x, y, z) according to the bounding box coordinates.
[0128] Among them, the calculation method of the center point coordinates can include: and
[0129] On this basis, the distance calculation formula includes: Among them, the coordinates of the current viewing point are: (px, py, pz).
[0130] Regarding the above step S107, refer to Figure 5 , which is a schematic flowchart of partial sub-steps of the above S107 in one embodiment. The tile level matching the distance in the target point cloud block is calculated through the following steps.
[0131] S107-1, calculate the downsampling ratio according to the resolution of the terminal and the set data threshold.
[0132] The thinning ratio may be specifically set according to the performance of the terminal 110, or may be calculated using a thinning ratio calculation formula.
[0133] The formula for calculating the thinning ratio includes: Wherein, B represents the thinning ratio, M represents the data threshold, h represents the height of the screen resolution of the terminal 110 , and w represents the width of the screen resolution of the terminal 110 .
[0134] S107 - 2 , taking the product of the thinning ratio and the thinning threshold as a rendering value, and calculating a quotient between the rendering value and the distance.
[0135] The rendering value is: H*B, and the quotient between the rendering value and the distance is: (H*B) / D.
[0136] S107-3, the quotient is corrected and rounded down to obtain a tile level that matches the distance.
[0137] According to the steps from S107-2 to S107-3, it can be summarized as using the tile level calculation formula to obtain the tile level, and the tile level calculation formula can be: Wherein, L represents the tile level, and the value "1" is a correction value, which can be adaptively adjusted according to actual application conditions.
[0138] Please continue to refer to Figure 5 The above step S107 also includes sub-steps S107-4 to S107-5, and steps S107-4 to S107-5 are used to determine the tile point cloud to be loaded of the target point cloud block based on the tile level.
[0139] S107-4, determine each tile point cloud at the tile level where the target point cloud block is located.
[0140] S107-5, obtaining the bounding box of each tile point cloud, and determining whether the area represented by the bounding box falls within the display range of the terminal. If not, discarding the tile point cloud corresponding to the bounding box to determine the tile point cloud to be loaded.
[0141] It is determined whether the area represented by the bounding box of the tile point cloud falls within the display range. If so, it is used as the tile point cloud to be loaded, otherwise it is discarded, so that all the point clouds to be loaded can be determined.
[0142] It should be understood that after the point cloud block is divided into multiple tile levels, each tile point cloud on each tile level has its own bounding box, which represents the position range of the tile point cloud.
[0143] On the basis of the above S107-4 to S107-5, the second request sent by the terminal 110 to the server 120 may include the tile level and the display range of the terminal 110. The server 120 determines, according to the display range, whether the tile point cloud at the tile level falls within the display range (i.e., whether the area where the tile point cloud is located falls within the display range). If it does not fall within the range, it is excluded; otherwise, it is sent to the terminal 110 as the point cloud to be loaded.
[0144] Further, referring to Figure 6 , in an implementation manner, the point cloud visualization optimization method provided by the embodiments of the present invention further includes S106. This step is performed after implementing S107 to obtain the tile point cloud to be loaded from the server 120 and perform rendering. In other words, after the terminal 110 obtains the tile point cloud to be loaded and performs rendering, S106 can be executed.
[0145] S106, calculate the amount of point cloud data already loaded by the terminal. If the amount of point cloud data is greater than the set data threshold, then delete the tile point cloud to be loaded that has been loaded in sequence from the lowest to the highest tile level until the amount of point cloud data already loaded by the terminal is less than the data threshold.
[0146] When the terminal 110 realizes obtaining the tile point cloud to be loaded and performing rendering, when the amount of point cloud data already loaded by the terminal 110 is greater than the set data threshold, the tile point cloud to be loaded with a lower tile level can be deleted to release memory, reduce the resource pressure on the terminal 110, and thus can avoid freezing to a certain extent.
[0147] It should be understood that the rendering implemented by S107 and its sub-steps S107-1 to S107-5 is a more detailed point cloud rendering, and the content it displays is more detailed. And the rendering implemented by step S109 is decimated rendering. The content displayed by its rendering result is relatively rough compared to the content displayed by the rendering result of S107, and the resources consumed by the terminal 110 are relatively reduced.
[0148] In an implementation manner, referring to Figure 7 , it is a schematic flowchart of some sub-steps of step S109, including the following steps.
[0149] S109-1, use the product of the decimation threshold and the set limit multiple as the limit value.
[0150] The limit multiple can be adaptively adjusted according to the actual performance of the terminal 110. The limit multiple can represent the maximum reduction multiple of point cloud rendering. If it exceeds this multiple, it may affect the loading efficiency of the terminal 110.
[0151] For example, according to the performance of the terminal 110, the limit multiple is set to 8, then the limit value is: 8H or H*8.
[0152] S109-2, determine whether the distance is greater than the limit value. If not, execute S109-3.
[0153] S109-3, calculate the thinning multiple that matches the distance.
[0154] S109-4, extract the zeroth-layer tile point cloud of the target point cloud block in the server according to the thinning multiple to obtain the point cloud to be loaded, and load and render the point cloud to be loaded.
[0155] After calculating the thinning multiple, the terminal 110 sends a second request to the server 120. At this time, the second request includes the identifier of the target point cloud block and the thinning multiple. The server 120 responds to the second request, extracts the zeroth-layer tile point cloud (i.e., the tile point cloud of the zeroth-layer tile level) of the target point cloud block according to the thinning multiple to obtain the point cloud to be loaded, and sends the point cloud to be loaded to the terminal 110. The terminal 110 loads and renders the point cloud to be loaded.
[0156] Through the above steps S109-1 to S109-4, when the distance of the target point cloud block is not less than the thinning threshold, if the distance of the target point cloud block is not greater than the limit value, calculate the thinning multiple that matches the distance, obtain the point cloud to be loaded of the target point cloud block according to the thinning multiple, and perform loading and rendering. Thus, to a certain extent, it can avoid the excessive amount of point cloud data loaded by the terminal 110 and affect the loading and rendering performance of the terminal 110.
[0157] Further, please continue to refer to Figure 7 , after step S109-2, if it is determined that the distance is greater than the limit value, execute S109-5.
[0158] S109-5, extract the zeroth-layer tile point cloud of the target point cloud block in the server 120 according to the preset maximum thinning multiple to obtain the point cloud to be loaded, and load and render the point cloud to be loaded.
[0159] When the distance of the target point cloud block is greater than the limit value, thin the zeroth-layer tile point cloud of the target point cloud block in the server 120 according to the preset maximum thinning multiple, obtain, load and render the point cloud to be loaded.
[0160] Regarding step S109-3, the method of calculating the thinning multiple can be flexibly selected. For example, use a neural network to calculate the thinning multiple that matches the distance, and use a set calculation rule to calculate the thinning multiple. In one implementation, refer to Figure 8 , which is a schematic flowchart of some sub-steps of the above step S109-3. The thinning multiple that matches the distance can be calculated through the following steps.
[0161] S201, Calculate the thinning ratio according to the resolution of the terminal and the set data threshold.
[0162] Similar to step S107-1, the thinning ratio can be specifically set according to the performance of the terminal 110, or can be obtained by calculating with the thinning ratio calculation formula.
[0163] The thinning ratio calculation formula includes: Among them, B represents the thinning ratio, M represents the data threshold, h represents the height of the screen resolution of the terminal 110, and w represents the width of the screen resolution of the terminal 110.
[0164] S202, Take the product of the thinning ratio and the thinning threshold as the rendering value.
[0165] S203, Calculate the quotient of the distance and the rendering value, round up the quotient to obtain the thinning multiple.
[0166] The thinning multiple can be obtained by the thinning multiple calculation formula. Among them, the thinning multiple calculation formula includes: Cb represents the thinning multiple.
[0167] Rounding up the quotient between the distance and the rendering value to obtain the thinning multiple, realizing thinning the target point cloud block according to the distance between the target point cloud block and the current view point. Thus, the closer the distance, the smaller the thinning multiple, and the more detailed the point cloud data. Therefore, the closer to the current view point, the more detailed the point cloud display. While improving the point cloud display effect, it can reduce the cache amount of the point cloud data in the terminal 110, and further help improve the fluency of the terminal 110.
[0168] Furthermore, referring to Figure 9 , in an implementation manner, the point cloud visualization optimization method provided by the embodiments of the present invention further includes step S108, and this step can be executed after S109.
[0169] S108, Calculate the amount of point cloud data loaded by the terminal. If the amount of point cloud data is greater than the set data threshold, then delete the loaded point cloud data one by one in the order from the earliest loading time to the latest loading time until the amount of point cloud data loaded by the terminal is less than the data threshold.
[0170] When the terminal 110 performs thinning rendering, in the case that the amount of point cloud data loaded by the terminal 110 is greater than the data threshold, the point cloud data with an earlier loading time can be deleted to reduce the amount of point cloud data loaded by the terminal 110 and release resources, thereby helping to reduce the probability of the terminal 110 being stuck or even crashing and improving the fluency of the terminal 110.
[0171] In one embodiment, referring to Figure 10 , the embodiments of the present invention also provide a point cloud visualization optimization method. This embodiment mainly focuses on the application of this method toFigure 1 Taking the server 120 as an example, it includes the following steps.
[0172] S301, receive the point cloud blocks uploaded by the acquisition device in real time.
[0173] The acquisition device 130 is used to obtain the point cloud blocks of the surveying and mapping object. The point cloud block refers to a point cloud data block.
[0174] Among them, the surveying and mapping object can be an area or an object, etc.
[0175] S303, divide the point cloud blocks into multiple tile levels according to the tree structure and store them in the database.
[0176] Among them, each tile level includes multiple tile point clouds. The point cloud blocks can be stored in the ept.json file, and one point cloud block corresponds to one ept.json file.
[0177] S305, receive the first request sent by the terminal, calculate the point cloud information of each target point cloud block in the first request, and send the point cloud information to the terminal. Receive the second request sent by the terminal, and return the point clouds to be loaded of each target point cloud block to the terminal according to the second request, so as to prompt the terminal to implement the point cloud visualization optimization method provided in the above embodiments.
[0178] Among them, the terminal 110 implements the point cloud visualization optimization method applied to the terminal provided in the above embodiments, and the first request is sent by the terminal 110 when the current viewing point and display range are obtained.
[0179] Further, please continue to refer to Figure 10 , which is a schematic flowchart of another part of the steps of the point cloud visualization optimization method applied to the server 120 provided in this embodiment, including the following steps, where step S302 is executed after step S301 or S303.
[0180] S302, record the identification information of the point cloud blocks in the index file.
[0181] The index file is the index.json file, which stores the identifiers of the point cloud blocks. Among them, the identifier can be an ID such as Block1, Block2, etc., or a numerical ID such as 1, 2, etc. The identification information also includes the ept.json file name storing the point cloud blocks.
[0182] S304, traverse the index file in real time, determine whether there is new data. If so, obtain the new point cloud blocks corresponding to the new data according to the identification information of the new data.
[0183] When the index file was traversed last time, the latest point cloud block information was recorded, or a mark was made on the latest point cloud block information. After this traversal, if there are new point cloud blocks after the latest point cloud block recorded last time, it is determined that there is new added data, and the information of the new added data is recorded as the latest point cloud block information, or a mark is made on the point cloud block information of the new added data, and the previous mark is deleted to facilitate finding the latest point cloud block next time.
[0184] S306, load the newly added point cloud block, calculate and store the point cloud information of the newly added point cloud block.
[0185] After obtaining the newly added point cloud block, calculate the point cloud information of the newly added point cloud block and store it. So that when receiving the second request sent by the terminal 110, the point cloud information can be obtained without real-time calculation.
[0186] Among them, the point cloud information may include but is not limited to a bounding box.
[0187] The point cloud visualization optimization method applied to the terminal 110 and the point cloud visualization optimization method applied to the server 120 provided by the embodiments of the present invention provide an efficient and flexible massive real-time point cloud rendering solution for the terminal 110 device. By rendering target point cloud blocks at different distances in different ways according to the distance between the target point cloud block and the current view point, the closer the distance, the more detailed the displayed point cloud data, and the farther the distance, the less the loaded point cloud data, so as to realize real-time display of point cloud details while reducing the data loading amount of the terminal 110 device, thereby reducing resource consumption and improving the fluency of the terminal 110 device.
[0188] It should be understood that although Figures 2 - 10 the steps in the flowchart of Figures 2 - 10 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,
[0189] To execute the corresponding steps in the above embodiments and each possible way, an implementation of a point cloud visualization optimization device is given below. It should be noted that the basic principle and the technical effects produced by the point cloud visualization optimization device provided in this embodiment are the same as those in the above embodiments. For a brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the above embodiments. In one embodiment, the point cloud visualization optimization device is applied to the terminal 110, the terminal 110 is communicatively connected to the server 120, the server 120 is communicatively connected to the acquisition device 130, the server 120 stores the point cloud blocks generated by the acquisition device 130 in a tree structure, and the point cloud visualization optimization device includes a preprocessing module and a rendering module.
[0190] The preprocessing module is configured to obtain the current viewing point in real time and determine the target point cloud blocks that fall within the display range of the terminal 110 according to the current viewing point.
[0191] Wherein, each point cloud block is divided into multiple tile levels in a tree structure, and each tile level includes multiple tile point clouds.
[0192] The preprocessing module is further configured to calculate the distance between the current viewing point and each target point cloud block.
[0193] The rendering module is configured to, for each target point cloud block, determine whether the distance is less than the thinning threshold. If so, calculate the tile level in the target point cloud block that matches the distance, determine the tile point clouds to be loaded in the target point cloud block based on the tile level, and obtain and load and render the tile point clouds to be loaded from the server 120.
[0194] Wherein, the calculation method of the thinning threshold can refer to the limitation of the point cloud visualization optimization method applied to the terminal 110 in the above text.
[0195] For the specific limitations of the point cloud visualization optimization device, reference can be made to the limitations of the point cloud visualization optimization method applied to the terminal 110 in the above text, and details will not be described herein again.
[0196] In one embodiment, an electronic device 140 is provided. The electronic device 140 may be the terminal 110, and its internal structure diagram may be as Figure 11As shown. The electronic device 140 includes a processor, a memory, a communication interface, a display screen, and an input device connected via a system bus. Among them, the processor of the electronic device 140 is used to provide computing and control capabilities. The memory of the electronic device 140 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device 140 is used to communicate with the external terminal 110 in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a carrier network, near field communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a point cloud visualization optimization method. The display screen of the electronic device 140 can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or buttons, a trackball, or a touchpad provided on the housing of the electronic device 140, or an external keyboard, touchpad, or mouse, etc.
[0197] In one embodiment, the point cloud visualization optimization device provided in the above embodiment of the present invention can be implemented in the form of a computer program, and the computer program can run on an electronic device as shown in Figure 11 the figure. Each program module constituting the point cloud visualization optimization device can be stored in the memory of the electronic device.
[0198] The embodiment of the present invention also gives another implementation manner of the point cloud visualization optimization device. It should be noted that for the point cloud visualization optimization device provided in this embodiment, its basic principle and the technical effects produced are the same as those in the above embodiment. For the sake of brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the above embodiment. In one embodiment, the point cloud visualization optimization device is applied to the server 120, and the server 120 is communicatively connected to the terminal 110 and the acquisition device 130. The point cloud visualization optimization device includes a receiving module and a processing module.
[0199] The receiving module is used to receive the point cloud blocks uploaded by the acquisition device 130 in real time.
[0200] The processing module divides the point cloud blocks into multiple tile levels in a tree structure and stores them in the database.
[0201] Among them, each tile level includes multiple tile point clouds.
[0202] The processing module is further configured to receive a first request sent by the terminal 110, calculate the point cloud information of each target point cloud block in the first request, and send the point cloud information to the terminal 110, receive a second request sent by the terminal 110, and return the point cloud to be loaded of each target point cloud block to the terminal 110 according to the second request, so as to prompt the terminal 110 to implement the point cloud visualization optimization method applied to the terminal 110 provided in the foregoing embodiments.
[0203] For the specific definition of the point cloud visualization optimization device, reference can be made to the definition of the point cloud visualization optimization method applied to the terminal 110 in the foregoing text, which will not be elaborated here.
[0204] In one embodiment, an electronic device 140 is provided. The electronic device 140 may be a server 120, and its internal structural diagram may be as Figure 11 shown. The electronic device 140 includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the electronic device 140 is used to provide computing and control capabilities. The memory of the electronic device 140 includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device 140 is used to store point cloud blocks. The network interface of the electronic device 140 is used to communicate with the external terminal 110 through a network connection. When the computer program is executed by the processor, it implements a point cloud visualization optimization method applied to the server 120 as described above.
[0205] Among them, the memory may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0206] In several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0207] In addition, each functional module in various embodiments of the present invention can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0208] If the above-mentioned functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0209] The above is only the preferred embodiments of the present invention and is not used to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A point cloud visualization optimization method, characterized in that, Applied to a terminal, the terminal is connected to a server in communication, the server is connected to a collection device in communication, the server stores point cloud blocks generated by the collection device in a tree structure, and the method includes: Acquire the current viewpoint in real time, and determine the target point cloud block that falls within the display range of the terminal according to the current viewpoint; wherein each point cloud block is divided into a plurality of tile levels in a tree structure, and each tile level includes a plurality of tile point clouds; Calculating the distance between the current viewpoint and each of the target point cloud blocks; For each of the target point cloud blocks, determining whether the distance is less than a thinning threshold; If yes, then calculate the tile level in the target point cloud block that matches the distance, determine the tile point cloud to be loaded of the target point cloud block based on the tile level, obtain the tile point cloud to be loaded from the server and load and render it; The step of calculating the tile level in the target point cloud block that matches the distance includes: Calculating a thinning ratio according to the resolution of the terminal and a set data threshold; Taking the product of the thinning ratio and the thinning threshold as a rendering value; Calculating a quotient between the rendering value and the distance; The quotient is corrected and then rounded down to obtain a tile level that matches the distance.
2. The point cloud visualization optimization method according to claim 1, wherein The step of determining the tile point cloud to be loaded of the target point cloud block based on the tile level includes: Determine each tile point cloud at the tile level where the target point cloud block is located; Obtain a bounding box of each of the tile point clouds, and determine whether the area represented by the bounding box falls within the display range of the terminal. If not, remove the tile point cloud corresponding to the bounding box to determine the tile point cloud to be loaded.
3. The point cloud visualization optimization method according to claim 1, characterized in that After the step of obtaining the tile point cloud to be loaded from the server and rendering it, the method further includes: Calculate the amount of point cloud data loaded by the terminal. If the amount of point cloud data is greater than the set data threshold, delete the loaded tile point clouds to be loaded one by one in order from the lowest to the highest tile level until the amount of point cloud data loaded by the terminal is less than the data threshold.
4. The point cloud visualization optimization method according to claim 1, wherein After the step of determining, for each of the target point cloud blocks, whether the distance is less than a thinning threshold, the method further includes: If so, the target point cloud block is rendered sparsely.
5. The point cloud visualization optimization method according to claim 4, characterized in that, The step of performing thinning rendering on the target point cloud block comprises: The product of the thinning threshold and the set limit multiple is used as the limit value, and whether the distance is greater than the limit value is determined. If not, a thinning multiple matching the distance is calculated; According to the thinning multiple, the zero-th layer tile point cloud of the target point cloud block in the server is extracted to obtain the point cloud to be loaded, and the point cloud to be loaded is loaded and rendered.
6. The point cloud visualization optimization method according to claim 5, characterized in that, The method further comprises: If the distance is greater than the limit value, the zeroth layer tile point cloud of the target point cloud block in the server is extracted according to the preset maximum thinning multiple to obtain the point cloud to be loaded, and the point cloud to be loaded is loaded and rendered.
7. The point cloud visualization optimization method according to claim 5, characterized in that, The step of calculating the thinning multiple that matches the distance includes: Calculate the thinning ratio according to the resolution of the terminal and the set data threshold; Use the product of the thinning ratio and the thinning threshold as the rendering value; Calculate the quotient of the distance and the rendering value, round up the quotient to obtain the thinning multiple.
8. The point cloud visualization optimization method according to claim 5, wherein After the step of thinning and rendering the target point cloud block, the method further includes: Calculate the amount of point cloud data loaded by the terminal. If the amount of point cloud data is greater than the set data threshold, delete the loaded point cloud data successively in the order from the earliest loading time to the latest loading time until the amount of point cloud data loaded by the terminal is less than the data threshold.
9. The point cloud visualization optimization method according to claim 1, characterized in that The step of calculating the distance between the current view point and each of the target point cloud blocks includes: Obtain the point cloud information of each target point cloud block from the server, and determine the center point coordinates of each target point cloud block based on the point cloud information; Calculate the distance between the current view point and each of the center point coordinates to obtain the distance between the current view point and each target point cloud block.
10. The point cloud visualization optimization method according to claim 9, wherein The step of determining the center point coordinates of each target point cloud block based on the point cloud information includes: Extract the bounding box of the target point cloud block from the point cloud information of each target point cloud block, and use the center point coordinates of the bounding box as the center point coordinates of the target point cloud block.
11. A method for optimizing point cloud visualization, characterized in that, Applied to a server, the server is communicatively connected to a terminal and a collection device, and the method includes: Real-time receive the point cloud blocks uploaded by the collection device; Divide the point cloud blocks into multiple tile levels in a tree structure and store them in a database; wherein, each tile level includes multiple tile point clouds; Receive a first request sent by the terminal, calculate the point cloud information of each target point cloud block in the first request, and send the point cloud information to the terminal. Receive a second request sent by the terminal, and return the point cloud to be loaded of each target point cloud block to the terminal according to the second request, so as to prompt the terminal to implement the point cloud visualization optimization method according to any one of claims 1 to 10.
12. The visualization optimization method according to claim 11, wherein The method further includes: Record the identification information of the point cloud block in an index file; Real-time traverse the index file to determine whether there is new data. If so, obtain the new point cloud block corresponding to the new data according to the identification information of the new data; Load the new point cloud block, calculate and store the point cloud information of the new point cloud block.
13. A point cloud visualization optimization system, characterized in that, Including a terminal, a server and a collection device, the server is communicatively connected to the terminal and the collection device; The collection device is used to generate point cloud blocks of an object to be surveyed; The server is used to implement the point cloud visualization optimization method according to claim 11 or 12; The terminal is used to implement the point cloud visualization optimization method according to any one of claims 1 to 10.
14. An electronic device, characterized in that, Including a processor and a memory, the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the point cloud visualization optimization method according to any one of claims 1-10 or the point cloud visualization optimization method according to claim 11 or 12.
15. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the point cloud visualization optimization method described in any one of claims 1-10 or the point cloud visualization optimization method described in claim 11 or 12.
Citation Information
Patent Citations
Method for dynamic browsing of vehicle-mounted mass point cloud data
CN104391906A
Point cloud visualization method and device
WO2021232469A1