An intelligent merging method for large-scale real-life 3D data
By intelligently merging large-scale real-life three-dimensional data, using technologies such as hierarchical structure remapping and crushed tile merging, the problem of inefficient data loading and display is solved, efficient loading and display of data is achieved, and the universality of data on different platforms is ensured.
Patent Information
- Application Number
- CN202210402246.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-18
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-04-18
AI Technical Summary
When processing large-scale real-life three-dimensional data, the prior art has problems such as low data loading and display efficiency, poor data processing stability, poor optimization parameters universality, and lack of universality in the output data format.
A large-scale real-life three-dimensional data is used to process data in standard Osgb format through optimization operations such as hierarchical structure remapping, crushed tile merging, and hierarchical switching coefficient adjustment to ensure the universality and efficiency of the data.
It improves the loading and display efficiency of large-scale real-life three-dimensional data, ensures the universality of data on different software platforms, and overcomes the problems of non-universal data format and poor processing stability in the existing technology.
Smart Images

Figure CN114742949B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of real-scene three-dimensional technology, and more specifically to an intelligent merging method for large-scale real-scene three-dimensional data. Background Art
[0002] Oblique photogrammetry involves mounting multiple sensors on the same flying platform to simultaneously collect images from five different angles, including a vertical angle, four oblique angles, etc. After completing the relevant internal processing, commercial processing software such as ContextCapture is usually used to export the data to form real-life 3D model data, which is usually stored in osgb format files.
[0003] As the accuracy of drone aerial photography continues to improve, the amount of data continues to increase. Affected by the point cloud density and grid accuracy of real-life 3D data, the tile radius of real-life 3D models exported using commercial software such as ContextCapture is small, and the number of tile folders increases, resulting in a large number of fragmented files, resulting in inefficient loading and display of real-life 3D data.
[0004] In order to improve the efficiency of loading and displaying large-scale real-life 3D data, the existing method is to adopt a specific dynamic monomer reconstruction algorithm to reduce the number and complexity of geometric figures of the data to a certain extent. However, there are problems such as weak data processing stability and low universality of optimization parameters. In addition, the output data format is not universal and is difficult to apply on different software platforms.
[0005] Therefore, it is necessary to develop an intelligent merging method for large-scale real-life 3D data. Summary of the invention
[0006] The purpose of the present invention is to provide a method for intelligently merging large-scale real-scene three-dimensional data, which is a universal method for intelligently merging large-scale real-scene three-dimensional data. The method processes real-scene three-dimensional data in a standard osgb format, and improves the loading and display efficiency of data while ensuring the universality of data through optimization operations such as hierarchical structure remapping, fragmented tile merging, and hierarchical switching coefficient adjustment (the input data of the present invention is universal data exported by commercial software such as ContextCapture. After intelligent merging and optimization according to the technical solution of the present invention, the loading and display efficiency of data can be improved, and the data still has universality); solves the problems of small tile radius, large amount of tile folder data, large number of fragmented files, low loading and display efficiency, etc. caused by the processing capacity limitations of commercial software such as ContextCapture when processing large-scale real-scene three-dimensional data.
[0007] In order to achieve the above object, the technical solution of the present invention is: a method for intelligently merging large-scale real-scene three-dimensional data, characterized in that it includes the following steps:
[0008] Step 1: According to the hierarchical division structure of the original real-scene 3D data tiles, analyze the minimum and maximum levels for data merging;
[0009] Step 2: Define the linking rules and naming rules for building tile pyramids between the minimum level and the maximum level, analyze the real-life 3D data, and build the hierarchical link relationship of tiles;
[0010] Step 3: Based on the constructed hierarchical link relationship, optimize the distance or pixel threshold for switching between levels;
[0011] Step 4: Based on the constructed hierarchical link relationship and switching threshold, merge the data level by level to generate optimized real-life 3D data.
[0012] In the above technical solution, in step 1, the hierarchical division structure of the real scene 3D data tiles is analyzed, and the minimum level and maximum level of data merging should be analyzed according to the hierarchical organizational structure of each tile folder in the real scene 3D data, and the minimum level and maximum level are determined. The calculation method of the minimum level and maximum level of the merged data includes the following steps:
[0013] Step 1.1: Randomly extract N tile folders from the original real-scene 3D data directory, where N <= the number of tile folders. The folders are named according to the standard real-scene 3D model rules, such as "Tile_+004_+009". The 004 and 009 in the file name represent the row and column numbers of the generated real-scene 3D model tiles.
[0014] Step 1.2: Define a hash table structure to record the minimum and maximum number of occurrences of each level in each folder. The type is hash<level, number of occurrences>. The variables are named Lmin_hash and Lmax_hash. They are used to count the frequency of occurrence of each level and determine the optimal merged level.
[0015] Step 1.3: Traverse the selected N tile files one by one, count the minimum and maximum levels in each tile folder, and record them in Lmin_hash and Lmax_hash;
[0016] Step 1.4: Traverse Lmin_hash in positive order. The number of occurrences of the Li-th level is Ci. If the Li-th level occurrence ratio Ci / N>75%, then the minimum merged level Lmin=Li;
[0017] Step 1.5: Traverse Lmax_hash in reverse order. The cumulative number of occurrences of the Lr-th level in reverse order is Cr. If the cumulative occurrence ratio of the Lr-th level Cr / N>90%, the maximum merged level Lmax=Lr.
[0018] In the above technical solution, in step 2, the calculation method for constructing the hierarchical link relationship of the real scene three-dimensional data and tiles includes the following steps;
[0019] Step 2.1: Traverse the real scene three-dimensional data tile folder, the tile folder is in the form of "Tile_+004_+009", and identify the row and column numbers X and Y identifiers of each tile according to the tile naming rule of Tile_+X_+Y;
[0020] Step 2.2: Count the row and column numbers of each tile to determine the row and column ranges Xmin, Xmax, Ymin, and Ymax of the real scene three-dimensional data;
[0021] Step 2.3: Define the current traversal level li = Lmax, traverse the levels from Lmax to Lmin in reverse order, and construct the hierarchical link relationship of the tiles according to the defined tile link and naming rules;
[0022] The construction of the hierarchical link relationship of the tiles specifically includes the following steps:
[0023] Step 2.3.1: Define the merging magnification Ti = 2^(Lmax–li+1) to specify the size of the tiles to be merged at the li level; define the merging numbers Xi = Xmin and Yi = Ymin, and traverse the tiles at the li level through a double loop;
[0024] Step 2.3.2: Traverse Xi and Yi respectively between Xmin, Xmax, Ymin, and Ymax, with an increment step of Ti; establish the correspondence between the merged tiles and the original tiles, and the range of the merged tiles corresponding to the original tiles at the li level is Xi~Xi+Ti in the X direction and Yi~Yi+Ti in the Y direction; establish the link relationship between the merged tiles at the li level and the tiles at the li+1 level, and link them in a one-to-four manner. The numbers of the corresponding four tiles in the X and Y directions are {Xi~Xi+Ti / 2, Yi~Yi+Ti / 2}, {Xi~Xi+Ti / 2, Yi+Ti / 2~Yi+Ti}, {Xi+Ti / 2~Xi+Ti, Yi~Yi+Ti / 2}, {Xi+Ti / 2~Xi+Ti, Yi+Ti / 2~Yi+Ti};
[0025] Step 2.3.3: Let li = li–1. If li >= Lmin, jump to step 2.3.1; if li < Lmin, the construction of the hierarchical link relationship has been completed.
[0026] In the above technical solution, in step 3, optimize the calculation of the distance or pixel threshold for switching between levels, including the following steps:
[0027] Step 3.1: Define the adjustment coefficient Lrate for switching between levels, which is used to adjust the distance threshold for switching between different levels of real scene 3D data; if Lrate = 1, the optimized data loading threshold is the same as the original data; if Lrate < 1, the optimized data will load high-precision data earlier; if Lrate > 1, the optimized data will load high-precision data at a closer distance threshold.
[0028] Step 3.2: Define the current traversed level li = Lmax, traverse the levels from Lmax to Lmin in reverse order, and optimize the level switching threshold according to the established tile link relationship.
[0029] In the above technical solution, in step 3.2, optimizing the level switching threshold according to the established tile link relationship specifically includes the following steps:
[0030] Step 3.2.1: Obtain the tile file sequence tiles_(li+1) of the li+1 level linked to the li level, and determine the level link mode. If it is the pixel mode, execute step 3.2.2; if it is the distance mode, execute step 3.2.3.
[0031] Step 3.2.2: Calculate the sum P(li+1) of the pixel threshold for loading the tile sequence tiles_(li+1) of the li+1 level, and the pixel condition threshold P(li) for loading the tiles of the li level = P(li+1) / 4.0*Lrate; jump and execute step 3.2.4.
[0032] Step 3.2.3: Calculate the radius Radius(li) of the tiles of the li level, and the distance condition threshold R(li) for loading the tiles of the li level = Radius(li)*7.0*Lrate.
[0033] Step 3.2.4: Let li = li – 1. If li >= Lmin, jump to step 3.2.1; if li < Lmin, the construction of the level link relationship has been completed.
[0034] In the above technical solution, in step 4, the method of gradually merging data and generating pyramid levels according to the established level link relationship and switching threshold includes the following steps:
[0035] Step 4.1: Create a hierarchical folder for the real scene 3D data according to the calculated hierarchical merging parameters, and perform a copy operation on the reusable data.
[0036] Step 4.2: Gradually perform vertex merging, texture generation merging, and pyramid level generation according to the established tile pyramid link relationship.
[0037] Step 4.3: Construct a real-life 3D data root node as the entry point for data loading to facilitate fast data import.
[0038] In the above technical solution, in step 4.1, a real scene 3D data folder hierarchy is created according to the calculated hierarchical merging parameters, and a copy operation is performed on the reusable data, which specifically includes the following steps:
[0039] Step 4.1.1: Create a folder directory from Lmin to Lmax+1 according to the calculated merge levels Lmin and Lmax;
[0040] Step 4.1.2: Copy the tiles at level li>Lmax in the original real-life 3D data to the newly created Lmax+1 folder.
[0041] In the above technical solution, in step 4.2, vertex merging, texture merging, and pyramid level generation are performed step by step according to the constructed tile pyramid link relationship. The specific method includes the following steps:
[0042] Step 4.2.1: Construct new tiles according to the naming rules, merge vertices and textures of the original li-level tiles according to the link relationship to form a merged vertex array and texture unit, and create a graphics data Geode node;
[0043] Step 4.2.2: According to the calculated switching threshold with the li+1 level, construct the paging scheduling node PagedLod, set the level switching mode to distance or pixel, and if the current distance or pixel is less than the switching threshold, link to the graphic data of the li level itself; otherwise, link to the graphic data of the li+1 level.
[0044] In the above technical solution, in step 4.3, the construction of the root node of the real scene 3D data specifically includes the following steps:
[0045] Step 4.3.1: Define the top-level switching coefficient TopRate, which is used to adjust the switching relationship with the Lmin level. The switching threshold between the root node and each node in the Lmin level is R(top)=Radius(Lmin)*TopRate;
[0046] Step 4.3.2: Construct a proxy node to manage the unified loading of the Lmin level. When the current distance is greater than the top-level display threshold, no data is loaded; when the current distance is less than the top-level display threshold, the corresponding Lmin level data is loaded for display.
[0047] The * above represents the mathematical symbol multiplication sign.
[0048] The large scale in the present invention mainly refers to the large data volume and data density of real-life 3D data (i.e., the data volume is greater than 40GB), and there are a large number of fragmented files (i.e., the top-level tile radius is less than 50 meters, and the number of tile folders is greater than 2000 files).
[0049] Compared with the prior art, the present invention has the following advantages:
[0050] (1) The method of the present invention optimizes the original real-scene 3D model pyramid structure based on the standard osgb data format of the real-scene 3D, maximizes the use of existing data results, and has high algorithm execution efficiency; the data results after intelligent merging and optimization completely retain the geometry and texture information of the original data, and have a significant effect on improving the loading speed on the 3D software platform;
[0051] (2) The parameters such as the merged data hierarchical structure of the method of the present invention are obtained by automatic statistical analysis and calculation of the original data tile hierarchical structure, thereby realizing the automation of intelligent data merging (i.e., the tiles of the real-life three-dimensional data are analyzed by an algorithm, the parameters that can be merged and optimized are automatically determined, the default merged hierarchical parameters are given, and intelligent merging is performed, and the entire process does not require manual intervention);
[0052] (3) The method of the present invention provides a real-scene three-dimensional data level switching mode based on distance or pixel, and provides an optimization calculation method for the switching threshold. By setting the adjustment coefficient, the timing of fine-level data loading can be customized, which has better flexibility and versatility and can be applied on different software platforms (the data exported by the present invention is basically consistent with the format of data exported by commercial software such as ContextCapture, and can be used in commercial 3DGIS software such as SuperMap, Zhongdi Digital, and Weijingxing, or open source 3DGIS software such as osgEarth, and improves loading and display efficiency; it overcomes the defect that the data usually exported by the prior art is in a proprietary format and used in conjunction with a specific three-dimensional display program, which has low applicability). BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 The present invention is a flowchart of a method for intelligently merging large-scale real-scene three-dimensional data.
[0054] Figure 2 It is a schematic diagram of the structural division and hierarchical definition of a tile folder in the original real-scene three-dimensional data according to the present invention.
[0055] Figure 3 It is a schematic diagram of the hierarchical structure and naming rules of the real-scene three-dimensional data tile pyramid defined in the present invention.
[0056] Figure 4It is a flowchart of the algorithm for calculating the minimum and maximum levels at which the original real-scene three-dimensional data should be merged according to the present invention.
[0057] Figure 5 It is a flow chart of the algorithm for constructing the link relationship between different levels after hierarchical merging of real scene three-dimensional data in the present invention.
[0058] Figure 6 It is a flow chart of calculating the switching thresholds between different levels after the hierarchical merging of real scene three-dimensional data according to the present invention.
[0059] Figure 7 It is an algorithm flow chart of the present invention for performing step-by-step real-scene three-dimensional data merging processing according to the constructed link relationship and the level switching threshold.
[0060] Figure 8 It is a real-scene three-dimensional data pyramid intelligent merging system diagram developed by the present invention based on the real-scene three-dimensional data intelligent merging method proposed.
[0061] Fig. 9 It is a file directory structure diagram before real scene 3D data processing in an embodiment of the present invention.
[0062] Fig.10 It is a file directory structure diagram after the real scene three-dimensional data processing is optimized in an embodiment of the present invention.
[0063] Fig.11 It is a three-dimensional visual preview of the top tile of the original data in the embodiment of the present invention, and displays the bounding box of the tile.
[0064] Fig.12 It is a three-dimensional visual preview of the top-level tile after the real-scene three-dimensional data processing and optimization in the embodiment of the present invention, and displays the bounding box of the tile.
[0065] Fig.13 It is a diagram of scheduling results of real scene 3D data tiles at different levels after the real scene 3D data processing is optimized in an embodiment of the present invention.
[0066] Fig.13 Screenshots of the optimized data at different 3D viewpoint distances. Fig.13 The four figures in FIG. 1 are the display results and tile bounding boxes (in FIG. 2 ) of the L14 to L17 level data loaded at different three-dimensional viewpoint distances after the optimization method of the present invention is used. Fig.13 In the figure, the first picture (upper left) shows a large range, the second picture (upper right) shows the 3D viewpoint focused on the riverbank area, and the third picture (lower left) and the fourth picture (lower right) further zoom in on the 3D viewpoint to show a finer level). Fig.13 It can be seen that at different field of view distances, the number of tiles merged by the method of the present invention is from large to small. DETAILED DESCRIPTION
[0067] The following is a detailed description of the implementation of the present invention in conjunction with the accompanying drawings, but they do not constitute a limitation of the present invention and are only given as examples. At the same time, the advantages of the present invention are made clearer and easier to understand through the description.
[0068] The present invention processes real-scene three-dimensional data in a standard osgb format, and improves data loading and display efficiency while ensuring data universality through optimization operations such as hierarchical structure remapping, broken tile merging, and hierarchical switching coefficient adjustment. The input data of the present invention is universal data exported by commercial software such as ContextCapture. After intelligent merging and optimization according to the technical solution of the present invention, the data loading and display efficiency can be improved, and the data still has universality. The present invention overcomes the defect that the prior art uses original data of different levels, but uses a custom index file, a custom file output method, and is loaded in conjunction with its own display module, and does not have universality. At the same time, the present invention overcomes the defect that the prior art does not use the original data of different levels, only uses the data of the most refined level, and regenerates data of other levels through a custom interpolation algorithm, the processing process is time-consuming, the quality of the newly generated tiles is difficult to guarantee, and the use of a proprietary format leads to a lack of universality.
[0069] like Figure 1 As shown, a method for intelligently merging large-scale real-scene three-dimensional data includes the following steps:
[0070] Step 1: Analyze the hierarchical division structure of the real-life 3D data tiles. The hierarchical organization structure of each tile folder in the real-life 3D data is as follows: Figure 2 As shown, according to this structure analysis, the minimum level and maximum level of data merging should be performed, and the algorithm flow for determining the minimum level and maximum level is as follows Figure 3 shown.
[0071] Step 1.1: Randomly extract N tile folders from the original real-life 3D data directory, where N <= the number of tile folders. The folders are named according to standard real-life 3D model rules, such as "Tile_+004_+009". The 004 and 009 in the file name represent the row and column numbers of the generated real-life 3D model tiles.
[0072] Step 1.2: Define a hash table structure to record the minimum and maximum number of occurrences of each level in each folder. The type is hash<level, number of occurrences>. The variables are named Lmin_hash and Lmax_hash. They are used to count the frequency of occurrence of each level and determine the optimal merge level.
[0073] Step 1.3: Traverse the selected N tile files one by one, count the minimum and maximum levels in each tile folder, and record them in Lmin_hash and Lmax_hash.
[0074] Step 1.4: Traverse Lmin_hash in positive order. The number of occurrences of the Li-th level is Ci. If the Li-th level occurrence ratio Ci / N>75%, the minimum merged level Lmin=Li.
[0075] Step 1.5: Traverse Lmax_hash in reverse order. The cumulative number of occurrences of the Lr-th level in reverse order is Cr. If the cumulative occurrence ratio of the Lr-th level Cr / N>90%, the maximum merged level Lmax=Lr.
[0076] Step 2: Define the linking rules and naming rules for building tile pyramids between the minimum level and the maximum level. Figure 4 As shown, and in accordance with Figure 5 The algorithm process analyzes the real-life 3D data and constructs a merged hierarchical link relationship of tiles.
[0077] Step 2.1: Traverse the real-scene 3D data tile folder, which is in the form of "Tile_+004_+009". Identify the row and column numbers X and Y of each tile according to the tile naming rule Tile_+X_+Y.
[0078] Step 2.2: Count the row and column numbers of each tile, and determine the row and column range Xmin, Xmax, Ymin, and Ymax of the real-scene 3D data.
[0079] Step 2.3: Define the current traversal level li=Lmax, traverse the levels from Lmax to Lmin in reverse order, and construct the hierarchical link relationship of the tiles according to the defined tile link and naming rules.
[0080] Step 2.3.1: Define the merge ratio Ti = 2^(Lmax–li+1) to specify the size of the tiles to be merged at the li level; define the merge number Xi = Xmin, Yi = Ymin, and traverse the tiles at the li level through a double loop.
[0081] Step 2.3.2: Traverse Xi and Yi respectively between Xmin, Xmax, Ymin, and Ymax with an increment step of Ti. Establish the correspondence between the merged tiles and the original tiles. The range of the original li-level tiles corresponding to the merged tiles is Xi to Xi+Ti in the X direction and Yi to Yi+Ti in the Y direction; establish the link relationship between the merged li-level tiles and the li+1-level tiles, and link them in a one-to-four manner. The numbers of the corresponding four tiles in the X and Y directions are {Xi to Xi+Ti / 2, Yi to Yi+Ti / 2}, {Xi to Xi+Ti / 2, Yi+Ti / 2 to Yi+Ti}, {Xi+Ti / 2 to Xi+Ti, Yi to Yi+Ti / 2}, {Xi+Ti / 2 to Xi+Ti, Yi+Ti / 2 to Yi+Ti}.
[0082] Step 2.3.3: Let li = li – 1. If li >= Lmin, jump to Step 2.3.1; if li < Lmin, the construction of the hierarchical link relationship has been completed.
[0083] The link rules and naming rules for constructing the tile pyramid between the minimum level and the maximum level in the present invention are custom rules, which are extended based on the standard real-scene 3D data naming rules. Standard files such as: Tile_+004_+009 represent that the row and column numbers of XY are 4 and 9. The extended rules here record the merged tile ranges in the X and Y directions. For example, Tile_+004007_+009012 indicates that this tile merges the ranges of 4 to 7 in X and 9 to 12 in Y for a certain level.
[0084] Step 3: Based on the constructed hierarchical link relationship, perform an optimization calculation on the distance or pixel threshold for switching between levels. The algorithm process is as Figure 6 shown.
[0085] Step 3.1: Define the adjustment coefficient Lrate for switching between levels, which is used to adjust the distance threshold for switching between different levels of real-scene 3D data. If Lrate = 1, the optimized data loading threshold is the same as the original data; if Lrate < 1, the optimized data will load high-precision data earlier; if Lrate > 1, the optimized data will load high-precision data at a closer distance threshold.
[0086] Step 3.2: Define the current traversed level li = Lmax, and traverse the levels from Lmax to Lmin in reverse order, and optimize the level switching threshold according to the established tile link relationship.
[0087] Step 3.2.1: Obtain the tile file sequence tiles_(li+1) of the (li+1)-th level corresponding to the li-level link, and determine the level link mode. If it is the pixel mode, execute Step 3.2.2; if it is the distance mode, execute Step 3.2.3.
[0088] Step 3.2.2: Calculate the sum of the pixel threshold P(li+1) for loading the tile sequence tiles_(li+1) of the (li+1)-th level. The pixel condition threshold P(li) for loading the li-level tile is P(li) = P(li+1) / 4.0*Lrate. Jump and execute Step 3.2.4.
[0089] Step 3.2.3: Calculate the radius Radius(li) of the li-level tile. The distance condition threshold R(li) for loading the li-level tile is R(li) = Radius(li)*7.0*Lrate.
[0090] Step 3.2.4: Let li = li – 1. If li >= Lmin, jump to Step 3.2.1; if li < Lmin, the construction of the level link relationship is completed.
[0091] Step 4: According to the constructed level link relationship and switching threshold, perform step-by-step merging on the data to generate optimized real-scene three-dimensional data. The algorithm process is as Figure 7 shown.
[0092] Step 4.1: Create a hierarchical structure of real-scene three-dimensional data folders according to the calculated hierarchical merging parameters, and perform a copy operation on the reusable data.
[0093] Step 4.1.1: Create a folder directory from Lmin to Lmax + 1 according to the calculated merging levels Lmin and Lmax.
[0094] Step 4.1.2: Copy the tiles with li > Lmax in the original real-scene three-dimensional data to the newly created Lmax + 1 folder. This part of the data is the reusable tile level.
[0095] Step 4.2: Perform vertex merging, texture generation merging, and pyramid level generation step by step according to the constructed tile pyramid link relationship.
[0096] Step 4.2.1: Construct new tiles according to the naming rules, perform vertex merging and texture merging on the original li-level tiles according to the link relationship, form the merged vertex array and texture unit, and create a Geode node for the graphic data.
[0097] Step 4.2.2: According to the calculated switching threshold with the li+1 level, construct the paging scheduling node PagedLod, set the level switching mode to distance or pixel, and if the current distance or pixel is less than the switching threshold, link to the graphic data of the li level itself; otherwise, link to the graphic data of the li+1 level.
[0098] Step 4.3: Construct a real-life 3D data root node as the entry point for data loading to facilitate fast data import.
[0099] Step 4.3.1: Define the top-level switching coefficient TopRate, which is used to adjust the switching relationship with the Lmin level. The switching threshold between the root node and each node in the Lmin level is R(top)=Radius(Lmin)*TopRate.
[0100] Step 4.3.2: Construct a proxy node to manage the unified loading of the Lmin level. When the current distance is greater than the top-level display threshold, no data is loaded; when the current distance is less than the top-level display threshold, the corresponding Lmin level data is loaded for display.
[0101] Example
[0102] In order to verify the effectiveness of the scheme of the present invention, the following experiment was carried out.
[0103] The specific implementation steps of a method for intelligently merging large-scale real-scene three-dimensional data are described as follows.
[0104] System: Based on the algorithm flow of the solution of the present invention, a real-scene 3D data pyramid intelligent merging system is developed, such as Figure 8 As shown, the real-life 3D data pyramid intelligent merging system has three components, including: directory settings, parameter settings, and progress information.
[0105] In the directory settings, fill in the original data address and the optimized address.
[0106] The parameter settings include: (1) minimum merge level and maximum merge level. After filling in the original data directory, the recommended level is automatically calculated according to step 1 of the present invention. The user can also make manual modifications and re-obtain the automatically calculated recommended level through the level calculation button. (2) LOD rate coefficient, corresponding to the "adjustment coefficient Lrate for switching between levels" in step 3 of the present invention, which is used to adjust the timing of the appearance of the fine level. (3) Root rate coefficient, corresponding to the "top-level switching coefficient TopRate" in step 4 of the present invention. (4) Copy the data that does not need to be merged check box, corresponding to step 4 of the present invention, copy the tiles of level li>Lmax in the original real-life 3D data to the new directory.
[0107] The progress information shows the progress of the processing. If the processing has not started, it shows the estimated number of tiles to be merged.
[0108] The intelligent merging process of large-scale real-scene 3D data is completed through the above-mentioned real-scene 3D data pyramid intelligent merging system.
[0109] Input: Data taken by a high-precision drone with 5 lenses, using ContextCapture oblique photography processing software to produce real-life 3D model data, exported in the form of standard osgb folder slices. Limited by the software processing power and machine performance, the processed real-life 3D data has 3241 data tile folders, with a data volume of 40.5GB. Its directory structure is as follows: Fig. 9 shown.
[0110] Processing process: The real-scene 3D data pyramid intelligent merging system developed by the present invention is used to perform optimization processing according to the intelligent merging method of large-scale real-scene 3D data of the present invention. The optimization processing process is as follows:
[0111] Step 1: Analyze the hierarchical division structure of the real-scene 3D data tiles, and calculate the minimum and maximum levels of tile merging.
[0112] Step 1.1: Randomly extract 500 tile folders from the original real-life 3D data directory, traverse and analyze the minimum and maximum levels that can be optimized in each tile folder, and use Lmin_hash and Lmax_hash to record the corresponding results. Among the minimum levels obtained by statistics, level 13 appears 24 times and level 14 appears 476 times; among the maximum levels obtained by statistics, level 16 appears 4 times, level 17 appears 456 times, level 18 appears 33 times, and level 19 appears 7 times.
[0113] Step 1.2: Traverse Lmin_hash in positive order. The number of occurrences of the Li-th level is Ci. The ratio of the 15th level occurrence is Ci / N=476 / 500>75%, so the minimum merged level Lmin=14.
[0114] Step 1.3: Traverse Lmax_hash in reverse order. The cumulative number of occurrences in reverse order of the Lrth level is Cr. The cumulative occurrence ratio of the 17th level is Cr / N=(7+33+456) / 500>90%, so the maximum merged level Lmax=17.
[0115] Step 2: According to the calculated minimum level and maximum level, construct the linking rules and naming rules of the tile pyramid to form the hierarchical linking relationship of the tiles.
[0116] Step 2.1: Traverse all real-scene 3D data tile folders, identify the row and column numbers X and Y of each tile according to the tile folder Tile_+X_+Y naming rule, and obtain the row and column range of the real-scene 3D data Xmin=0, Xmax=76, Ymin=0, Ymax=68.
[0117] Step 2.2: Define the current traversal level li=Lmax, traverse levels 17 (Lmax) to 14 (Lmin) in reverse order, build the hierarchical link relationship of the tiles according to the defined tile link and naming rules, calculate the merging ratios in the X and Y directions, and obtain the merging ratio of the 17th layer as T17=2^(Lmax–li+1)=2^(17–17+1)=2, the merging ratio of the 16th layer as 4, the merging ratio of the 15th layer as 8, and the merging ratio of the 14th layer as 16.
[0118] Step 2.3: According to the merging ratio in the X and Y directions, every 4 original tiles in the 17th layer are combined into a new data, every 16 original tiles in the 16th layer are combined into a new data, every 64 original tiles in the 15th layer are combined into a new data, and every 256 original tiles in the 14th layer are combined into a new data. At the same time, the link relationship between different newly synthesized tiles L14~L17 levels is established.
[0119] Step 3: Based on the constructed hierarchical link relationship, optimize the distance or pixel threshold for switching between levels.
[0120] Step 3.1: In order to make the layer switching threshold of the processed data consistent with that of the original data, define the adjustment coefficient of the layer switching Lrate=1.
[0121] Step 3.2: Define the current traversal level li = Lmax, traverse the levels 17 (Lmax) to 14 (Lmin) in reverse order, and optimize the level switching threshold according to the established tile link relationship. If the level link mode is pixel mode, obtain the loading pixel threshold of the li+1 level tile sequence tiles_(li+1) of the li level link, and sum them to P(li+1), then the li level tile loading pixel condition threshold P(li) = P(li+1) / 4.0*Lrate; if the level link mode is distance mode, calculate the radius Radius(li) of the li level tile, and the li level tile distance condition threshold R(li) = Radius(li)*7.0*Lrate.
[0122] Step 4: Based on the constructed hierarchical link relationship and switching threshold, the data is merged level by level to generate optimized real-scene 3D data.
[0123] Step 4.1: According to the calculated minimum merge level Lmin=14 and the maximum merge level Lmax=17, create a real-life 3D data folder, including L14, L15, L16, L17, and L18, and copy the tiles of level li>Lmax in the original real-life 3D data to the newly created L18 folder. This part of the data is a reusable real-life 3D data tile level.
[0124] Step 4.2: Vertex merging, texture merging, and pyramid level generation are performed step by step according to the constructed tile pyramid link relationship.
[0125] Step 4.3: Define the top-level switching coefficient TopRate = 49, link to the Lmin level, the switching threshold R(top) = Radius(Lmin)*TopRate between the root node and each node in the Lmin level, and construct the real-life 3D data root node Root.osgb according to this threshold as the entry point for data loading to facilitate fast data import.
[0126] Processing result: After the input real scene 3D data is processed according to the processing process of the present invention, the file structure of the processing result is organized as follows: Fig.10 The total data volume of the real-scene 3D data file after processing and optimization is 41.2GB, and the number of tiles at each level is: 22 (L14 level), 72 (L15 level), 250 (L16 level), 885 (L17 level), 3237 (L18 level, subsequent levels are scheduled according to the original data sharding).
[0127] Comparative analysis: Compared with the original data volume of 40.5 GB, the data volume after the optimization process according to the present invention increases slightly, mainly because some merged intermediate nodes are added, but the loading and display efficiency is much greater than the original data.
[0128] Using the OpenSceneGraph graphics library to develop a data loading program, at a longer display distance, the tile bounding box of the original data and optimized data loading is displayed, such as Fig.11 and Fig.12 shown. Fig.11 The loading result of the original real-life 3D data required the reading, writing and scheduling of 3,237 tiles, which generated a large number of fragmented files, and took 1 minute and 30 seconds. Fig.12 In order to adopt the optimized real-scene 3D data loading result of the present invention, only 22 tiles need to be loaded at the top layer (L14 level), which takes 4 seconds, thus greatly improving the loading and display efficiency.
[0129] Fig.13 The tile bounding boxes at different levels are shown, marked with white wireframes on the tiles, reflecting the Fig.11 The difference between the original bounding box. Fig.13 What is displayed are levels 14 to 17 of the data, which are the levels after the data is merged using the method of the present invention.
[0130] The original data needs to load 3237 tiles at the L14 to L17 levels. The large number of tiles takes a long time, and it takes 1 minute and 30 seconds to load the L14 level alone.
[0131] The number of tiles at each level of the data optimized by the present invention is 22 (L14 level), 72 (L15 level), 250 (L16 level), and 885 (L17 level). The pyramid hierarchical progressive loading reduces the number of file IO times and improves the loading rate. The data test shows that it only takes 4 seconds to load the L14 level, and the speed at the L15 to L7 levels is also improved to varying degrees compared with the original data. Fig.13 The display results of the optimized real-scene three-dimensional data at different levels L14 to L17 are shown. The inter-level link relationship constructed according to the present invention is optimized and scheduled, thereby improving the data loading and display performance at different levels.
[0132] Fig.11 The data before optimization is shown. Figure 12-13 The optimized data is shown. Figure 11-13 It can be seen that the geometry and texture of the data itself are not modified before and after optimization (the geometry and texture information of the original data are completely retained), only hierarchical merging is performed, and tiles with different merging degrees are loaded at different levels, which improves the loading speed compared to before optimization (the present invention has a significant effect on improving the loading speed on the three-dimensional software platform).
[0133] It can be seen that the customized data merging strategy proposed by the method of the present invention can improve the three-dimensional loading and display rate as much as possible through intelligent calculation merging while ensuring the universality of the result data.
[0134] Other parts not described belong to the prior art.
Claims
1. A method for intelligently merging large-scale real-scene three-dimensional data, characterized in that: The following steps are included: Step 1: According to the hierarchical division structure of the original real-scene 3D data tiles, analyze the minimum and maximum levels for data merging; Step 2: Define the linking rules and naming rules for building tile pyramids between the minimum level and the maximum level, analyze the real-life 3D data, and build the hierarchical link relationship of tiles; Step 3: Based on the constructed hierarchical link relationship, optimize the distance or pixel threshold for switching between levels; Step 4: Based on the constructed hierarchical link relationship and switching threshold, merge the data level by level to generate optimized real-scene 3D data; In step 1, the hierarchical division structure of the real-life 3D data tiles is analyzed, and the minimum and maximum levels of data merging should be analyzed according to the hierarchical organizational structure of each tile folder in the real-life 3D data, and the minimum and maximum levels are determined, and the calculation method of the minimum and maximum levels of the merged data includes the following steps: Step 1.1: Randomly extract N tile folders from the original real-scene 3D data directory, where N <= the number of tile folders, and the folders are named according to standard real-scene 3D model rules; Step 1.2: Define a hash table structure to record the minimum and maximum number of levels in each folder. Name the variables Lmin_hash and Lmax_hash. Count the frequency of each level and determine the optimal merged level, where Lmin_hash is the minimum level in each tile folder and Lmax_hash is the maximum level in each tile folder. Step 1.3: Traverse the selected N tile files one by one, count the minimum and maximum levels in each tile folder, and record them in Lmin_hash and Lmax_hash; Step 1.4: Traverse Lmin_hash in positive order. The number of occurrences of the Li-th level is Ci. If the Li-th level occurrence ratio Ci / N>75%, then the minimum merged level Lmin=Li; Step 1.5: Traverse Lmax_hash in reverse order. The cumulative number of occurrences of the Lr-th level in reverse order is Cr. If the cumulative occurrence ratio of the Lr-th level Cr / N>90%, the maximum merged level Lmax=Lr.
2. The intelligent merging method of large-scale real-scene three-dimensional data according to claim 1, characterized in that: In step 2, a method for calculating the hierarchical link relationship of tiles based on the real scene three-dimensional data includes the following steps: Step 2.1: traverse the real-scene 3D data tile folder and identify the row and column numbers X and Y of each tile according to the tile naming rules; Step 2.2: Count the row and column numbers of each tile, and determine the row and column range Xmin, Xmax, Ymin, and Ymax of the real scene 3D data; Step 2.3: define the current traversal level li = Lmax, traverse the levels from Lmax to Lmin in reverse order, and construct the hierarchical link relationship of the tiles according to the defined tile link and naming rules; The construction of the hierarchical link relationship of tiles includes the following steps: Step 2.3.1: Define the merging ratio Ti = 2^(Lmax–li+1) to specify the size of the tiles to be merged at level li; define the merging numbers Xi = Xmin, Yi = Ymin, and traverse the tiles at level li through a double loop; Step 2.3.2: Traverse Xi and Yi between Xmin, Xmax, Ymin, and Ymax respectively, with an increment step size of Ti; establish the correspondence between the merged tiles and the original tiles. The range of the original li-level tiles corresponding to the merged tiles is Xi~Xi+Ti in the X direction and Yi~Yi+Ti in the Y direction; establish the link relationship between the merged li-level tiles and the li+1-level tiles, and link them in a one-to-four manner. The numbers of the corresponding four tiles in the X and Y directions are {Xi~Xi+Ti / 2, Yi~Yi+Ti / 2}, {Xi~Xi+Ti / 2, Yi+Ti / 2~Yi+Ti}, {Xi+Ti / 2~Xi+Ti, Yi~Yi+Ti / 2}, {Xi+Ti / 2~Xi+Ti, Yi+Ti / 2~Yi+Ti}; Step 2.3.3: Let li = li – 1. If li >= Lmin, jump to Step 2.3.1; if li < Lmin, the construction of the hierarchical link relationship has been completed.
3. The intelligent merging method of large-scale real-scene 3D data according to claim 2, characterized in that: In Step 3, perform an optimization calculation on the distance or pixel threshold for switching between levels, including the following steps: Step 3.1: Define the adjustment coefficient Lrate for switching between levels, which is used to adjust the distance threshold for switching between different levels of real scene three-dimensional data; if Lrate = 1, the optimized data loading threshold is the same as the original data; if Lrate < 1, the optimized data will load high-precision data earlier; If Lrate > 1, the optimized data will load high-precision data at a closer distance threshold; Step 3.2: Define the current traversed level li = Lmax, and traverse the levels from Lmax to Lmin in reverse order to optimize the level switching threshold according to the established tile link relationship.
4. The intelligent merging method of large-scale real-scene 3D data according to claim 3, characterized in that: In Step 3.2, optimize the level switching threshold according to the established tile link relationship, specifically including the following steps: Step 3.2.1: Obtain the sequence of li+1-level tile files tiles_(li+1) linked to the li level, and determine the hierarchical link mode. If it is the pixel mode, execute Step 3.2.2; if it is the distance mode, execute Step 3.2.3; Step 3.2.2: Calculate the sum of the pixel threshold P(li+1) for loading the li+1-level tile sequence tiles_(li+1), and the pixel condition threshold P(li) for loading the li-level tiles = P(li+1) / 4.0*Lrate; Jump to and execute Step 3.2.4; Step 3.2.3: Calculate the radius Radius(li) of the li-level tiles, and the distance condition threshold R(li) for loading the li-level tiles = Radius(li)*7.0*Lrate; Step 3.2.4: Let li = li – 1. If li >= Lmin, jump to Step 3.2.1; if li < Lmin, the construction of the hierarchical link relationship has been completed.
5. The intelligent merging method of large-scale real-scene three-dimensional data according to claim 4, characterized in that: In Step 4, according to the established hierarchical link relationship and switching threshold, perform a method of gradually merging the data and generating pyramid levels, including the following steps: Step 4.1: Create a real-scene 3D data folder hierarchy according to the calculated hierarchical merging parameters, and copy the reusable data; Step 4.2: Vertex merging, texture merging, and pyramid level generation are performed step by step according to the constructed tile pyramid link relationship; Step 4.3: Construct a real-life 3D data root node as the entry point for data loading to facilitate fast data import.
6. The intelligent merging method of large-scale real-scene 3D data according to claim 5, characterized in that: In step 4.1, a real-scene 3D data folder hierarchy is created according to the calculated hierarchical merging parameters, and the reusable data is copied, which specifically includes the following steps: Step 4.1.1: Create a folder directory from Lmin to Lmax+1 according to the calculated merge levels Lmin and Lmax; Step 4.1.2: Copy the tiles at level li>Lmax in the original real-life 3D data to the newly created Lmax+1 folder.
7. The intelligent merging method of large-scale real-scene 3D data according to claim 6, characterized in that: In step 4.2, vertex merging, texture merging, and pyramid level generation are performed step by step according to the constructed tile pyramid link relationship. The specific method includes the following steps: Step 4.2.1: Construct new tiles according to the naming rules, merge vertices and textures of the original li-level tiles according to the link relationship to form a merged vertex array and texture unit, and create a graphics data Geode node; Step 4.2.2: According to the calculated switching threshold with the li+1 level, construct the paging scheduling node PagedLod, set the level switching mode to distance or pixel, and if the current distance or pixel is less than the switching threshold, link to the graphic data of the li level itself; otherwise, link to the graphic data of the li+1 level.
8. The intelligent merging method of large-scale real-scene 3D data according to claim 7, characterized in that: In step 4.3, the construction of the root node of the real scene 3D data includes the following steps: Step 4.3.1: Define the top-level switching coefficient TopRate, which is used to adjust the switching relationship with the Lmin level. The switching threshold between the root node and each node in the Lmin level is R(top)=Radius(Lmin)*TopRate; Step 4.3.2: Construct a proxy node to manage the unified loading of the Lmin level. When the current distance is greater than the top-level display threshold, no data is loaded; when the current distance is less than the top-level display threshold, the corresponding Lmin level data is loaded for display.
Citation Information
Patent Citations
Three-dimensional model data tile type rapid loading method
CN106600523A