Data compression method, device, equipment and storage medium for oblique photography model

By analyzing and merging vertices in OSGB data and building detection windows with resolution, the problem of low OSGB data compression efficiency is solved, and more efficient data transmission and storage is achieved.

CN119313750BActive Publication Date: 2025-04-04北京观微科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411857785.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-04
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

The prior art is difficult to effectively compress tilted photography model data in the open scene graph binary (OSGB) format, resulting in low transmission and storage efficiency.

Method used

By obtaining OSGB data, parsing the vertex list and index list, creating a linked list, and building a vertex merge detection window based on resolution, iterating over the vertices to determine the vertices that need to be merged, and compressing the data based on their index.

Benefits of technology

It realizes effective compression of OSGB data, and improves data transmission and storage efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313750B_ABST
    Figure CN119313750B_ABST
Patent Text Reader

Abstract

The present invention provides a data compression method, device, equipment and storage medium of an oblique photography model, and relates to the field of geographic data processing technology. The method comprises: obtaining data of an oblique photography model to be compressed, parsing the data to obtain a vertex list and an index list of the model data, and creating a linked list based on the vertex list and the index list, wherein the linked list stores the first vertex included in the vertex list and the index corresponding to each first vertex; constructing a detection window based on the resolution of the oblique photography model to be compressed, wherein the size information of the detection window is determined based on the resolution of the oblique photography model to be compressed; traversing each first vertex of the oblique photography model to be compressed through a vertex merging detection window to determine the first vertex to be merged, and compressing the data of the oblique photography model based on the index corresponding to the first vertex to be merged. The present invention realizes effective data compression and improves the transmission and storage efficiency of the oblique photography model data to be compressed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of geographic data processing technology, and in particular to a data compression method, device, equipment and storage medium for an oblique photography model. Background Art

[0002] With the rapid development of 3D geographic information systems, the amount of data is increasing day by day. Traditional data storage and transmission methods can no longer meet the growing demand for data. Figure 2 The oblique photography model data in Open Scene Graph Binary (OSGB) format is a widely used 3D geographic data format. Due to the large amount of oblique photography model data, the transmission and storage efficiency of OSGB uncompressed oblique photography model data is low.

[0003] Therefore, how to effectively compress the OSGB oblique photography model data to be compressed, thereby improving the transmission and storage efficiency of the OSGB oblique photography model data to be compressed, has become a technical problem that urgently needs to be solved in the industry. Summary of the invention

[0004] In view of the problems existing in the prior art, the present invention provides a data compression method, device, equipment and storage medium for an oblique photography model, which realizes effective compression of OSGB oblique photography model data to be compressed and improves the transmission and storage efficiency of OSGB oblique photography model data to be compressed.

[0005] In a first aspect, the present invention provides a data compression method for an oblique photography model, the method comprising the following steps:

[0006] Get the open scene of the oblique photography model to be compressed Figure 2 Data in hexadecimal format OSGB;

[0007] Parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices;

[0008] Based on the resolution of the oblique photography model to be compressed, constructing a vertex merging detection window; target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed;

[0009] The first vertices of the oblique photography model to be compressed are traversed through the vertex merging detection window to determine the first vertices that need to be merged, and the data of the oblique photography model to be compressed is compressed based on the indexes corresponding to the first vertices that need to be merged to obtain compressed oblique photography model data; the indexes corresponding to the first vertices that need to be merged are determined based on the indexes corresponding to the first vertices.

[0010] According to a data compression method for an oblique photography model provided by the present invention, the vertex merging detection window is constructed based on the resolution of the oblique photography model to be compressed, comprising:

[0011] Determining target size information according to the resolution of the oblique photography model to be compressed; the target size information is used to characterize the side length of the three-dimensional cube;

[0012] The vertex merging detection window is determined based on the side length of the three-dimensional cube.

[0013] According to a data compression method for an oblique photography model provided by the present invention, traversing each first vertex of the oblique photography model to be compressed through the vertex merging detection window to determine the first vertex to be merged includes:

[0014] Traversing each of the first vertices through the vertex merging detection window to obtain an index of each of the first vertices and a spatial relationship between each of the first vertices;

[0015] Determine a spatial distance value between each first vertex and other first vertices based on the index of each first vertex and the spatial relationship between each first vertices;

[0016] Based on the index of each of the first vertices, determine the Euclidean distance value between each of the first vertices and the other first vertices;

[0017] Determine invalid vertices based on the indexes of the first vertices, the spatial relationship between the first vertices, and the topological structure of the oblique photography model to be compressed;

[0018] The first vertices to be merged are determined based on the spatial distance values ​​between each of the first vertices and the other first vertices, the Euclidean distance values ​​between each of the first vertices and the other first vertices, and the invalid vertices.

[0019] According to a data compression method of an oblique photography model provided by the present invention, before compressing the data of the oblique photography model to be compressed based on the index corresponding to the first vertex to be merged to obtain the compressed oblique photography model data, the method further includes:

[0020] A first root node in the oblique photography model to be compressed is identified; wherein the first root node corresponds to a tile representing the oblique photography model to be compressed.

[0021] According to a data compression method of an oblique photography model provided by the present invention, compressing the data of the oblique photography model to be compressed based on the index corresponding to the first vertex to be merged to obtain compressed oblique photography model data, comprising:

[0022] Determine a first root node to be merged according to an index corresponding to the first vertex to be merged and an index corresponding to each of the first vertices;

[0023] Create a new second root node, and add the child nodes and leaf nodes of the first root node to be merged to the new second root node;

[0024] According to the new second root node, updating the target information corresponding to the child nodes and leaf nodes of the first root node to be merged, to obtain updated target information;

[0025] Based on the updated target information, determining a second vertex corresponding to the oblique photography model to be compressed;

[0026] Based on the second vertex corresponding to the oblique photography model to be compressed, the compressed oblique photography model data is determined.

[0027] According to a data compression method for an oblique photography model provided by the present invention, the target information corresponding to the child nodes and leaf nodes of the first root node to be merged is updated according to the new second root node to obtain the updated target information, including:

[0028] According to the new second root node, updating the parent node information corresponding to the child nodes and leaf nodes of the first root node to be merged, to obtain updated parent node information; the updated parent node information is used to indicate that the child nodes and leaf nodes of the first root node to be merged point to the second root node;

[0029] According to the new second root node, the hierarchical structures corresponding to the child nodes and leaf nodes of the first root node to be merged are updated to obtain an updated hierarchical structure; the updated hierarchical structure is used to indicate that the child nodes and leaf nodes of the first root node to be merged correspond to the second root node;

[0030] According to the new second root node, merging the materials corresponding to the child nodes and leaf nodes of the first root node to be merged into the material of the second root node to obtain updated material information;

[0031] According to the new second root node, the textures corresponding to the child nodes and leaf nodes of the first root node to be merged are merged into the overall texture atlas, and the texture information of the second root node is updated based on the overall texture atlas to obtain updated texture information; the material and texture information corresponding to the child nodes and leaf nodes of the first root node to be merged are obtained based on the texture list and texture data of the oblique photography model data to be compressed, and the texture list and the texture data are obtained by parsing the OSGB data of the oblique photography model to be compressed;

[0032] The updated target information is determined according to the updated parent node information, the updated hierarchical structure, the updated material information, and the updated texture information.

[0033] According to a data compression method for an oblique photography model provided by the present invention, the vertex attribute of each of the first vertices is represented by a floating point number, and the vertex attribute includes at least one of the following: position, normal and texture coordinates; the method further includes:

[0034] quantizing the vertex attributes of each of the first vertices to obtain first vertex data in integer form;

[0035] The first vertex data in the integer form is compressed twice by using a prediction compression method to obtain compressed second vertex data; the prediction compression method includes: parallelogram difference or texture coordinate prediction;

[0036] The encoding length of the compressed second vertex data is allocated according to the distribution of the compressed second vertex data.

[0037] According to a data compression method of an oblique photography model provided by the present invention, the method further comprises:

[0038] Determine the texture data of the compressed OSGB oblique photography model data to be compressed;

[0039] The compressed texture data of the OSGB oblique photography model data to be compressed is stored as texture data in a Khronos texture container format.

[0040] According to a data compression method of an oblique photography model provided by the present invention, the method further comprises:

[0041] Determine a second root node in the compressed oblique photography model data;

[0042] Merge the number of the second root nodes into a preset number, and create an index file corresponding to the second root nodes in the preset number;

[0043] Creating an index file for tiles other than the second root node within the preset number;

[0044] The total index is determined according to the index file corresponding to the second root node within the preset number and the index file corresponding to the tile other than the second root node within the preset number.

[0045] In a second aspect, the present invention further provides a data compression device for an oblique photography model, the device comprising the following modules:

[0046] Parsing module, used to obtain the open scene of the oblique photography model to be compressed Figure 2 Data in hexadecimal format OSGB;

[0047] Parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices;

[0048] A compression module, configured to construct a vertex merging detection window based on the resolution of the oblique photography model to be compressed; target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed;

[0049] The first vertices of the oblique photography model to be compressed are traversed through the vertex merging detection window to determine the first vertices that need to be merged, and the data of the oblique photography model to be compressed is compressed based on the indexes corresponding to the first vertices that need to be merged to obtain compressed oblique photography model data; the indexes corresponding to the first vertices that need to be merged are determined based on the indexes corresponding to the first vertices.

[0050] In a third aspect, the present invention further provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a data compression method for the oblique photography model as described in any one of the above-mentioned methods is implemented.

[0051] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a data compression method for an oblique photography model as described in any one of the above.

[0052] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the data compression method of the oblique photography model as described in any one of the above.

[0053] The data compression method, device, equipment and storage medium of the oblique photography model provided by the present invention first obtain an open scene of the oblique photography model to be compressed Figure 2 OSGB data in binary format; parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list, wherein the linked list stores at least two first vertices in the vertex list and the indexes corresponding to each first vertex; then, constructing a vertex merging detection window based on the resolution of the oblique photography model to be compressed; the target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed; further, traversing each first vertex of the oblique photography model to be compressed through the vertex merging detection window, determining the first vertex to be merged, and determining the compressed oblique photography model data based on the index corresponding to the first vertex to be merged, wherein the index corresponding to the first vertex to be merged is determined based on the index corresponding to each first vertex.

[0054] In the present invention, since the oblique photography models to be compressed with different model structures have different model resolutions, and since the size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed, the vertex merging detection window is constructed based on the resolution of the oblique photography model to be compressed. Then, the first vertices of the oblique photography model to be compressed can be traversed based on the vertex merging detection window, and the merging strategy can be determined to perform vertex merging and top-level reconstruction, thereby achieving effective compression of the OSGB oblique photography model data to be compressed and improving the transmission and storage efficiency of the oblique photography model data to be compressed. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0056] Figure 1 This is one of the flow charts of the data compression method of the oblique photography model provided by the present invention.

[0057] Figure 2 This is the second flow chart of the data compression method of the oblique photography model provided by the present invention.

[0058] Figure 3 It is a structural schematic diagram of the data compression device of the oblique photography model provided by the present invention.

[0059] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first" and "second" are generally a class, and the number of objects is not limited. For example, the first node can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally represents that the front and back associated objects are in an "or" relationship.

[0062] Combine the following Figure 1-Figure 4 The invention describes a data compression method, device, apparatus and storage medium for an oblique photography model.

[0063] Figure 1 FIG. 1 is one of the flow charts of the data compression method of the oblique photography model provided by the present invention. Figure 1 As shown, the method includes the following:

[0064] Step 101: Obtain an open scene of the oblique photography model to be compressed Figure 2 Data in hexadecimal format OSGB;

[0065] Specifically, it should be noted that the execution subject of this embodiment is an electronic device, which is used to realize the open scene of the oblique photography model. Figure 2 The compression of OSGB data in binary format improves the transmission and storage efficiency of OSGB oblique photography model data to be compressed.

[0066] First, obtain the open scene of the oblique photography model to be compressed Figure 2 The data is in OSGB format. For example, the oblique photography model to be compressed is loaded, and all files with the extension of OSGB in the subfolder corresponding to the oblique photography model to be compressed are read.

[0067] Among them, (Open Scene Graph Binary, OSGB) open scene Figure 2The binary format is a binary file format associated with (OpenScene Graph, OSG). Open Scene Graph is an open source graphics rendering engine used for the management and rendering of 3D scenes, and is widely used in fields such as virtual reality, game development, scientific visualization, and simulation. Here are some key information about OSGB: 1. File format: OSGB is a binary file format used to store 3D scene data, including geometry, textures, lighting, animation, and other information. 2. Compression: OSGB files usually use compression technology to reduce file size for easy storage and transmission. 3. Efficient rendering: OSGB files are designed to provide efficient rendering performance, which is achieved by optimizing data structures and rendering processes. 4. Cross-platform: Open Scene Graph supports multiple operating systems, including Windows, Linux, and macOS, so OSGB files can be used on these platforms. 5. Open source: OSG is an open source project that follows an open source license, allowing developers to use and modify it freely. 6. Application areas: Virtual reality (VR): used to create and render virtual environments; Game development: as part of a game engine, it handles the rendering of 3D scenes; Scientific visualization: used to display complex scientific data and models; Simulation: used for simulation and training in the military and aviation fields. 7. Tools and plug-ins: There are many tools and plug-ins for creating, editing, and viewing OSGB files, such as OSGEarth and OSGi. 8. Extensibility: The architecture of OSG allows developers to add new features through plug-ins and extensions to adapt to specific needs. OSGB files and Open Scene Graph are important tools in the field of 3D graphics.

[0068] The organizational structure of OSGB data usually uses the Data directory as the data entry directory, which contains multiple subdirectories. Each subdirectory is a root block. Each root block is a tree structure, which is a LOD (Level of Detail Model) hierarchical structure. Each root block corresponds to many .osgb files, and the osgb file with the same name as the directory name in the subdirectory is the root file.

[0069] When reading OSGB files, a stack is needed to assist in reading each block.

[0070] Step 102: parse the OSGB data of the oblique photography model to be compressed, obtain a vertex list and an index list of the oblique photography model data to be compressed, and create a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices;

[0071] Specifically, after all OSGB data are loaded, the OSGB data of the oblique photography model to be compressed needs to be parsed, for example, all OSGB data are parsed according to the OSGB model data structure specification, and vertex lists, index lists, texture lists, and texture data are output.

[0072] Among them, the OSGB model data structure specifications include the following: OSGB binary data contains many fields, including non-key fields and key fields of the OpenSceneGraph framework. The key fields mainly include vertex coordinates, normal coordinates and texture data of the three-dimensional model, as well as LOD information. The file header information consists of low and high bits, which are 4 bytes respectively, each of which is a 16-bit MD5 code. OSGB data contains many different blocks (composed of multiple fields), and these blocks are nested in OSGB, so the OSGB data format is relatively complex. After parsing the OSGB data of the compressed oblique photography model, you can get the vertex list, index list, texture list, and texture data.

[0073] Furthermore, a linked list can be created based on the vertex list and the index list. The vertex list contains multiple first vertices and the positions of the vertices, and the index list contains the index of each first vertex. Each first vertex and the index corresponding to each first vertex are stored in a linked list or a vector Vector, where a vector is a common data structure, usually referring to an array that can grow and shrink dynamically. In some programming languages, a vector is also called a list or a dynamic array.

[0074] Step 103: construct a vertex merging detection window based on the resolution of the oblique photography model to be compressed; the target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed;

[0075] Specifically, after all first vertices included in the oblique photography model data to be compressed are determined, vertex merging may be further performed to perform data compression.

[0076] In this embodiment, a vertex merging detection window may be first constructed based on the resolution of the oblique photography model to be compressed, and then all first vertices contained in the oblique photography model data to be compressed may be traversed based on the vertex merging detection window to determine a vertex merging strategy. That is, the purpose of the vertex merging detection window is to traverse the model structure based on the detection window, merge the vertices that need to be merged, reduce the number of vertices, and achieve data compression.

[0077] The size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed.

[0078] Step 104, traverse the first vertices of the oblique photography model to be compressed through the vertex merging detection window, determine the first vertices that need to be merged, and compress the data of the oblique photography model to be compressed based on the index corresponding to the first vertex that needs to be merged, so as to obtain compressed oblique photography model data; the index corresponding to the first vertex that needs to be merged is determined based on the index corresponding to each first vertex.

[0079] Specifically, after defining the vertex merging detection window, the vertex merging detection window can be used to traverse the first vertices of the oblique photography model to be compressed. During the traversal process, for example, the detection process starts from the center point of the model and moves in all directions at intervals of resolution*5 until the entire model is traversed. Based on the spatial range and data volume of the vertices within the detection window, determine which vertices can be merged, that is, determine the first vertex that needs to be merged. Among them, the basis for determining whether which vertices can be merged is, for example: the spatial proximity of the root node, data redundancy and model complexity.

[0080] Further, the compressed oblique photography model data is determined based on the index corresponding to the first vertex to be merged, wherein the index corresponding to the first vertex to be merged is determined based on the index corresponding to each first vertex. For example, the entire model is traversed, and the above processing is performed to complete vertex merging.

[0081] The method provided in this embodiment first obtains an open scene of the oblique photography model to be compressed. Figure 2 OSGB data in binary format; parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list, wherein at least two first vertices in the vertex list and the indexes corresponding to the first vertices are stored in the linked list; then, a vertex merging detection window is constructed based on the resolution of the oblique photography model to be compressed; the target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed; further, the first vertices of the oblique photography model to be compressed are traversed through the vertex merging detection window to determine the first vertices to be merged, and the compressed oblique photography model data is determined based on the indexes corresponding to the first vertices to be merged, wherein the indexes corresponding to the first vertices to be merged are determined based on the indexes corresponding to the first vertices.

[0082] In the present invention, since the oblique photography models to be compressed with different model structures have different model resolutions, and since the size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed, the vertex merging detection window is constructed based on the resolution of the oblique photography model to be compressed. Then, the first vertices of the oblique photography model to be compressed can be traversed based on the vertex merging detection window, and the merging strategy can be determined to perform vertex merging and top-level reconstruction, thereby achieving effective compression of the OSGB oblique photography model data to be compressed and improving the transmission and storage efficiency of the OSGB oblique photography model data to be compressed.

[0083] According to a data compression method of an oblique photography model provided by the present invention, a vertex merging detection window is constructed based on the resolution of the compressed oblique photography model, comprising:

[0084] Determining target size information according to the resolution of the oblique photography model to be compressed; the target size information is used to characterize the side length of the three-dimensional cube;

[0085] A vertex merging detection window is determined based on the side length of the three-dimensional cube.

[0086] Specifically, in some embodiments, the specific implementation process of constructing the vertex merging detection window based on the size information of the vertex merging detection window in step 103 includes the following steps:

[0087] First, the size information of the vertex merging detection window is determined according to the resolution of the oblique photography model to be compressed. The resolution of the oblique photography model to be compressed, for example, represents the image data obtained by sampling at a large interval based on the input data of the oblique photography model to be compressed, that is, the input model resolution. The size information of the vertex merging detection window is defined according to the model resolution. The vertex merging detection window is, for example, a three-dimensional cube, and the size information is used to represent the side length of the three-dimensional cube.

[0088] Furthermore, the vertex merging detection window is determined based on the side length of the three-dimensional cube corresponding to the vertex merging detection window. For example, the detection window is a cube with a side length of model resolution*20.

[0089] The method provided in this embodiment determines the size information of the vertex merging detection window according to the resolution of the oblique photography model to be compressed, wherein the vertex merging detection window is a three-dimensional cube, and the size information is used to characterize the side length of the three-dimensional cube; then, the vertex merging detection window is determined based on the side length of the three-dimensional cube corresponding to the vertex merging detection window. In the present invention, because the oblique photography models to be compressed with different model structures have different model resolutions, and because the size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed, the vertex merging detection window is constructed based on the size information of the vertex merging detection window, and then the first vertices of the oblique photography model to be compressed can be traversed based on the vertex merging detection window, and the merging strategy can be determined to perform vertex merging and top-level reconstruction, thereby achieving effective compression of the OSGB oblique photography model data to be compressed and improving the transmission and storage efficiency of the OSGB oblique photography model data to be compressed.

[0090] According to a data compression method of an oblique photography model provided by the present invention, each first vertex of the oblique photography model to be compressed is traversed through a vertex merging detection window to determine the first vertex to be merged, including:

[0091] Traversing each first vertex through the vertex merging detection window to obtain the index of each first vertex and the spatial relationship between each first vertex;

[0092] Determine a spatial distance value between each first vertex and other first vertices based on the index of each first vertex and the spatial relationship between each first vertex;

[0093] Based on the index of each first vertex, determine the Euclidean distance value between each first vertex and other first vertices;

[0094] Determine invalid vertices based on the indexes of the first vertices, the spatial relationship between the first vertices, and the topological structure of the oblique photography model to be compressed;

[0095] Based on the spatial distance values ​​between each first vertex and other first vertices, the Euclidean distance values ​​between each first vertex and other first vertices, and invalid vertices, first vertices to be merged are determined.

[0096] Specifically, in some embodiments, the specific implementation process of traversing each first vertex of the oblique photography model to be compressed through the vertex merging detection window in step 104 and determining the first vertex to be merged includes the following steps:

[0097] It should be noted that during the detection window traversal process, based on the spatial range and data volume of the vertices in the detection window, it is determined which first vertices can be merged. Exemplarily, the process of determining which first vertices can be merged is, for example, as follows:

[0098] First, the first vertices are traversed through the vertex merging detection window to obtain the index of each first vertex and the spatial relationship between the first vertices. The spatial relationship between the first vertices is used to characterize the spatial range of each first vertex.

[0099] A spatial proximity index can be used to determine whether there are first vertices that need to be merged. For example, based on the index of each first vertex and the spatial relationship between each first vertex, the spatial distance value between each first vertex and other first vertices is determined. Among them, the spatial distance value is an important indicator of spatial proximity. Spatial proximity refers to the degree of proximity of data points or nodes in space. In this embodiment, for example, a spatial distance metric is used to calculate the distance between nodes, and then combined with a distance threshold to determine whether each first vertex is adjacent.

[0100] Furthermore, data redundancy indicators can be used to determine whether there is repeated or similar information. For example, the Euclidean distance method is used to calculate the similarity between data points, and by setting a threshold, highly similar data points or subsets are identified. Specifically, based on the index of each first vertex, the Euclidean distance value between each first vertex and other first vertices is determined. Further, a clustering algorithm (such as K-means, DBSCAN) is used to group the data and observe the redundancy of the data within the group. Statistical redundancy, calculate the average similarity or redundancy index of each group of data points to quantify the degree of redundancy. For highly redundant data, data merging is performed. In the clustering process, outlier detection is also performed to identify those outliers that are significantly different from most data points and eliminate them.

[0101] Furthermore, the model complexity index can also be used to determine whether there are invalid vertices. On the one hand, the complexity of the model is reflected in the increase in the number of vertices of the model, and on the other hand, the complex structure of the model will lead to the complexity of the model's topological structure. Due to technical principles, oblique photography data will contain a large number of complex surfaces, holes and other abnormal structures. These structures often have a large number of vertices and have no practical significance. Use mesh fusion to process the complex parts, merge the corresponding vertices, and regenerate the edges and faces. Specifically, based on the index of each first vertex, the spatial relationship between the first vertices, and the topological structure of the oblique photography model to be compressed, the invalid vertices are determined.

[0102] Furthermore, based on the spatial distance values ​​between each first vertex and other first vertices, the Euclidean distance values ​​between each first vertex and other first vertices, and invalid vertices, the first vertices that need to be merged are determined, that is, it is determined which first vertices need to be merged, and then the vertex merging is performed. It should be emphasized that the indicators in these three aspects are not executed in a sequential relationship, and this judgment is a complex process. There will be different combinations for different situations, and the weights and thresholds of the three aspects are not static. The core of the present invention is to use the indicators in the three aspects to quantify the model structure and the amount of vertex data, and then identify some vertices that need to be merged, and then perform operations through threshold judgment to achieve the purpose of simplifying the model data.

[0103] The method provided in this embodiment configures a merging strategy based on the vertex merging detection window and factors such as the spatial proximity of each first vertex, data redundancy or model complexity, performs vertex merging and root node merging, and completes the top-level reconstruction of OSGB data, thereby achieving vertex compression of OSGB data and improving data transmission and storage efficiency.

[0104] According to a data compression method of an oblique photography model provided by the present invention, the data of the oblique photography model to be compressed is compressed based on the index corresponding to the first vertex to be merged, and before obtaining the compressed oblique photography model data, the method further includes:

[0105] A first root node in the oblique photography model to be compressed is identified; wherein the first root node corresponds to a tile representing the oblique photography model to be compressed.

[0106] Specifically, in some embodiments, before determining the compressed oblique photography model data based on the index corresponding to the first vertex to be merged in step 104, the method further includes:

[0107] It can be understood that the first root node corresponds to a tile representing the oblique photography model to be compressed.

[0108] The process of identifying the first root node in the oblique photography model to be compressed can be achieved by the following steps:

[0109] Identify the root node by checking the file structure. Oblique photography data is usually stored in the OSGB organization of Smart3D format. The data directory must have a general entry of the "Data" directory, and a metadata.xml file is placed at the same level to record the location information of the model. Each tile directory must have an OSGB file with the same name as the directory name. This file is the root node file.

[0110] Alternatively, you can identify the root node by checking the file naming. The root node file in each tile directory usually has the same name as the directory name, which is a key clue to identifying the root node.

[0111] The method provided in this embodiment first identifies the first root node in the oblique photography model to be compressed, then merges vertices and then merges root nodes to finally achieve top-level reconstruction, complete data compression, and improve data transmission and storage efficiency.

[0112] According to a data compression method of an oblique photography model provided by the present invention, the data of the oblique photography model to be compressed is compressed based on the index corresponding to the first vertex to be merged to obtain compressed oblique photography model data, including:

[0113] Determine the first root node to be merged according to the index corresponding to the first vertex to be merged and the indexes corresponding to each first vertex;

[0114] Create a new second root node, and add the child nodes and leaf nodes of the first root node to be merged to the new second root node;

[0115] According to the new second root node, the target information corresponding to the child nodes and leaf nodes of the first root node to be merged is updated to obtain the updated target information;

[0116] Based on the updated target information, determining a second vertex corresponding to the oblique photography model to be compressed;

[0117] Based on the second vertex corresponding to the oblique photography model to be compressed, the compressed oblique photography model data is determined.

[0118] Specifically, in some embodiments, the process of determining the compressed oblique photography model data based on the index corresponding to the first vertex to be merged in step 104 includes the following steps:

[0119] First, the first root node to be merged is determined according to the index corresponding to the first vertex to be merged and the indexes corresponding to each first vertex, and then the first vertices to be merged are merged.

[0120] Furthermore, root merging can be further performed. During the merging process, the geometric structure and texture information of the model need to be recalculated to ensure that the merged model is visually and geometrically continuous. Specifically, 1) a new second root node is created, and the child nodes and leaf nodes of the first root node to be merged are added to the new second root node; 2) according to the new second root node, the target information corresponding to the child nodes and leaf nodes of the first root node to be merged is updated to obtain updated target information, such as parent node information, hierarchical structure, etc. 3) Based on the updated target information, the second vertex corresponding to the oblique photography model to be compressed is determined. Among them, the second vertex corresponding to the oblique photography model to be compressed contains the final root node.

[0121] Furthermore, based on the second vertex corresponding to the oblique photography model to be compressed, the compressed oblique photography model data can be determined to complete the top layer reconstruction.

[0122] Optionally, the following steps may be performed after the top-level reconstruction:

[0123] 1. Check that the updated data is correct and resolve any errors or inconsistencies.

[0124] 2. Record all data merges and updates for subsequent data maintenance and management.

[0125] The method provided in this embodiment first merges vertices and then merges root nodes to finally achieve top-level reconstruction, completes the compression of OSGB oblique photography model data to be compressed, and improves data transmission and storage efficiency.

[0126] According to a data compression method for an oblique photography model provided by the present invention, target information corresponding to the child nodes and leaf nodes of the first root node to be merged is updated according to the new second root node to obtain the updated target information, including:

[0127] According to the new second root node, the parent node information corresponding to the child nodes and leaf nodes of the first root node to be merged is updated to obtain updated parent node information; the updated parent node information is used to indicate that the child nodes and leaf nodes of the first root node to be merged point to the second root node;

[0128] According to the new second root node, the hierarchical structures corresponding to the child nodes and leaf nodes of the first root node to be merged are updated to obtain an updated hierarchical structure; the updated hierarchical structure is used to indicate that the child nodes and leaf nodes of the first root node to be merged correspond to the second root node;

[0129] According to the new second root node, the materials corresponding to the child nodes and leaf nodes of the first root node to be merged are merged into the material of the second root node to obtain updated material information;

[0130] According to the new second root node, the textures corresponding to the child nodes and leaf nodes of the first root node to be merged are merged into the overall texture atlas, and the texture information of the second root node is updated based on the overall texture atlas to obtain updated texture information; the material and texture information corresponding to the child nodes and leaf nodes of the first root node to be merged are obtained based on the texture list and texture data of the oblique photography model data to be compressed, and the texture list and texture data are obtained by parsing the OSGB data of the oblique photography model to be compressed;

[0131] Updated target information is determined according to the updated parent node information, the updated hierarchy, the updated material information, and the updated texture information.

[0132] Specifically, in some embodiments, the specific implementation process of updating the target information corresponding to the child nodes and leaf nodes of the first root node to be merged to obtain the updated target information according to the new second root node includes the following steps:

[0133] First, according to the new second root node, the parent node information corresponding to the child nodes and leaf nodes of the first root node that need to be merged is updated to obtain the updated parent node information; the updated parent node information is used to indicate that the child nodes and leaf nodes of the first root node that need to be merged point to the second root node, that is, update the parent node information of all relevant child nodes and leaf nodes to point them to the new root node.

[0134] Furthermore, according to the new second root node, the hierarchical structures corresponding to the child nodes and leaf nodes of the first root node that need to be merged are updated to obtain an updated hierarchical structure; the updated hierarchical structure is used to indicate that the child nodes and leaf nodes of the first root node that need to be merged correspond to the second root node, that is, the hierarchical structure of the child nodes and leaf nodes is updated so that they correspond to the new root node.

[0135] Furthermore, based on the new second root node, the materials corresponding to the child nodes and leaf nodes of the first root node that need to be merged are merged into the material of the second root node to obtain updated material information, that is, the materials of all child nodes are merged into the material of the root node to ensure that the root node has only one material.

[0136] Further, according to the new second root node, the textures corresponding to the child nodes and leaf nodes of the first root node to be merged are merged into the overall texture atlas, and the texture information of the second root node is updated based on the overall texture atlas to obtain updated texture information. Among them, the material and texture information corresponding to the child nodes and leaf nodes of the first root node to be merged are obtained based on the texture list and texture data of the oblique photography model data to be compressed, and the texture list and texture data are obtained by parsing the OSGB data of the oblique photography model to be compressed.

[0137] Furthermore, updated target information is determined according to the updated parent node information, the updated hierarchy, the updated material information, and the updated texture information.

[0138] The method provided in this embodiment can reduce the traversal and calculation of child nodes during rendering by merging root nodes, thereby improving rendering efficiency and loading speed.

[0139] According to a data compression method for an oblique photography model provided by the present invention, the vertex attribute of each first vertex is represented by a floating point number, and the vertex attribute includes at least one of the following: position, normal and texture coordinate; the method further includes:

[0140] quantizing the vertex attributes of each first vertex to obtain first vertex data in integer form;

[0141] The first vertex data in integer form is compressed twice by using a prediction compression method to obtain compressed second vertex data; the prediction compression method includes: parallelogram difference or texture coordinate prediction;

[0142] According to the distribution of the compressed second vertex data, the encoding length of the compressed second vertex data is allocated.

[0143] Specifically, in some embodiments, the vertex attribute of each first vertex is represented by a floating point number, and the vertex attribute includes at least one of the following: position, normal, and texture coordinates.

[0144] The method further includes: performing secondary compression on the vertices of the oblique photography 3D model data based on the Draco algorithm. Specifically:

[0145] First, the vertex attributes of each first vertex are quantized to obtain first vertex data in integer form; then, the first vertex data in integer form are secondary compressed using a prediction compression method to obtain compressed second vertex data, wherein the prediction compression method includes: parallelogram difference or texture coordinate prediction.

[0146] Furthermore, the encoding length of the compressed second vertex data is allocated according to the distribution of the compressed second vertex data. For example, an entropy coding algorithm is used so that common data uses a shorter encoding and uncommon data uses a longer encoding. Including rANS (Reversible Arithmetic Non-uniform Symmetric Encoding).

[0147] Draco is a relatively efficient compression method. Draco is a compression algorithm developed by Google. As a quantization-based compression method, it has the characteristics and advantages of sequential optimized encoding, support for general attributes, and configurable compression. Draco is currently the most cost-effective vertex compression algorithm in image processing. Draco can compress mesh and point cloud data. Since the two data representations are essentially different, it does not rely on a single compression algorithm, but uses a variety of different technologies to optimize the compression of these two representations in terms of compression ratio, decoding speed, and discretization loss. It aims to improve the storage and transmission of 3D graphics and greatly accelerate the encoding, transmission, and decoding of 3D data.

[0148] The method provided in this embodiment performs secondary compression on the vertices of the data based on the draco algorithm to improve the data compression ratio.

[0149] According to a data compression method of an oblique photography model provided by the present invention, the method further comprises:

[0150] Determine the texture data of the compressed OSGB oblique photography model data to be compressed;

[0151] The compressed texture data of the OSGB oblique photography model data to be compressed is stored as texture data in the Khronos texture container format.

[0152] Specifically, in some embodiments, the method further includes:

[0153] The texture data of the compressed OSGB oblique photography model data to be compressed is determined, and then the texture data of the compressed OSGB oblique photography model data to be compressed is stored as texture data in a Khronos texture container format.

[0154] Using the KTX2 (Khronos Texture Container) method to compress textures can effectively reduce the video memory usage of oblique photography 3D model data in the device, and improve operating efficiency and stability. KTX is a texture storage format that is supported by the GPUs of most mobile devices. It can effectively reduce the video memory usage of the device, and improve operating efficiency and stability. KTX2 is currently a good texture compression algorithm in the field of image processing. The original osgb uses JPEG format textures by default. The storage capacity of textures in KTX2 format is about 90% of the default jpg, which can reduce video memory consumption by about 5 / 6. In one embodiment, a 1024*1024 resolution texture, the default JPEG actually occupies a fixed 3MB video memory in the video memory, and only 3MB / 6=512KB is processed into KTX2. It can be seen that using KTX2 to compress textures can reduce video memory consumption. In addition, by compressing the textures of oblique photography 3D model data with KTX2, the GPU can directly sample them without CPU decompression, which can greatly reduce memory and bandwidth usage and improve operating efficiency.

[0155] The method provided in this embodiment performs secondary compression on the texture of the oblique photography 3D model data through KTX2 to improve the compression ratio, and is directly sampled by the GPU without CPU decompression, which can greatly reduce memory and bandwidth usage and improve operating efficiency.

[0156] According to a data compression method of an oblique photography model provided by the present invention, the method further comprises:

[0157] Determine a second root node in the compressed oblique photography model data;

[0158] Merge the number of second root nodes into a preset number, and create an index file corresponding to the second root nodes within the preset number;

[0159] Create an index file for tiles other than the second root node within a preset number;

[0160] The total index is determined according to the index files corresponding to the second root nodes within the preset number and the index files corresponding to the tiles other than the second root nodes within the preset number.

[0161] Specifically, in some embodiments, the method further includes generating a total index for the plurality of oblique photography 3D model data after the top layer reconstruction, and the implementation process is as follows:

[0162] Determine the second root node in the compressed oblique photography model data, merge the number of second root nodes into a preset number, and establish an index file corresponding to the second root node within the preset number, the preset number of which is, for example, 10; establish an index file for tiles other than the second root node within the preset number; determine the total index based on the index file corresponding to the second root node within the preset number and the index file corresponding to the tile other than the second root node within the preset number.

[0163] For example, the root nodes are continuously merged based on the compressed oblique photography model data until the number of root nodes is less than 10. A new index file is created for the last remaining block to speed up the cache call of the oblique photography 3D model data. There is no additional data optimization when merging multiple block indexes. Instead, the indexes of multiple oblique photography 3D model data are merged together to obtain a total index. The front end calls this file to load the entire oblique photography 3D model.

[0164] The method provided in this embodiment finally merges all the results, generates a total index, and completes the compression of the entire OSGB data.

[0165] Figure 2 FIG. 2 is a flow chart of the data compression method of the oblique photography model provided by the present invention. Figure 2 As shown, the method provided in this embodiment includes the following steps:

[0166] Step 201: load the oblique photography model, parse the internal data and output the vertex list, index list, texture list and texture data.

[0167] Step 202: traverse the vertices to establish a vertex index table.

[0168] Step 203: Identify the root node.

[0169] Step 204: define a vertex merging detection window.

[0170] Step 205: confirm a merging strategy based on the detection window, and merge vertices based on the merging strategy.

[0171] Step 206: Execute the root merge strategy to complete top-level reconstruction.

[0172] Step 207: Based on the draco algorithm, perform secondary compression on the vertices of the data.

[0173] Step 208: compress the texture of the oblique photography 3D model data based on the KTX2 algorithm.

[0174] Step 209: Generate a total index based on the multiple oblique photography 3D model data after top-level reconstruction.

[0175] The method provided in this embodiment parses the OSGB data of the three-dimensional model of oblique photography, extracts internal data information such as vertices, indexes, and textures, identifies the root node of the model, and then defines the vertex merging detection window according to the model resolution. The detection window configures the merging strategy based on factors such as the spatial proximity of the nodes, data redundancy, or model complexity. Vertex merging is first performed, and then root node merging is performed to complete the top-level reconstruction of the OSGB data, thereby achieving vertex compression of the OSGB data. Based on the draco algorithm, the vertices of the data are compressed twice; based on the KTX2 algorithm, the texture of the three-dimensional model data of the oblique photography is compressed, and finally all the results are merged to generate a total index to complete the compression of the overall OSGB data.

[0176] The data compression device of the oblique photography model provided by the present invention is described below. The data compression device of the oblique photography model described below and the data compression method of the oblique photography model described above can be referred to each other.

[0177] Figure 3 Schematic diagram of the structure of the data compression device of the oblique photography model provided by the present invention. Figure 3 As shown, the data compression device 300 of the oblique photography model includes a parsing module 310 and a compression module 320, wherein:

[0178] The parsing module 310 is used to obtain the open scene of the oblique photography model to be compressed Figure 2 Data in hexadecimal format OSGB;

[0179] Parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices;

[0180] The compression module 320 is used to construct a vertex merging detection window based on the resolution of the oblique photography model to be compressed; the target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed;

[0181] The first vertices of the oblique photography model to be compressed are traversed through the vertex merging detection window to determine the first vertices that need to be merged, and the data of the oblique photography model to be compressed is compressed based on the indexes corresponding to the first vertices that need to be merged to obtain compressed oblique photography model data; the indexes corresponding to the first vertices that need to be merged are determined based on the indexes corresponding to the first vertices.

[0182] The device provided in this embodiment includes a parsing module 310 and a compression module 320. The parsing module 310 is used to obtain an open scene of the oblique photography model to be compressed. Figure 2 OSGB data in binary format; parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list, wherein at least two first vertices and the indexes corresponding to each first vertex are stored in the linked list; the compression module 320 constructs a vertex merging detection window based on the resolution of the oblique photography model to be compressed; the target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed; and then, traversing each first vertex of the oblique photography model to be compressed through the vertex merging detection window, determining the first vertex to be merged, and determining the compressed oblique photography model data based on the index corresponding to the first vertex to be merged, wherein the index corresponding to the first vertex to be merged is determined based on the index corresponding to each first vertex.

[0183] In the present invention, since the oblique photography models to be compressed with different model structures have different model resolutions, and since the size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed, the vertex merging detection window is constructed based on the resolution of the oblique photography model to be compressed. Then, the first vertices of the oblique photography model to be compressed can be traversed based on the vertex merging detection window, and the merging strategy can be determined to perform vertex merging and top-level reconstruction, thereby achieving effective compression of the OSGB oblique photography model data to be compressed and improving the transmission and storage efficiency of the OSGB oblique photography model data to be compressed.

[0184] According to a data compression device 300 of an oblique photography model provided by the present invention, the compression module 320 is specifically used for:

[0185] Determining target size information according to the resolution of the oblique photography model to be compressed; the target size information is used to characterize the side length of the three-dimensional cube;

[0186] The vertex merging detection window is determined based on the side length of the three-dimensional cube.

[0187] According to the data compression device 300 of the oblique photography model provided by the present invention, the compression module 320 is further used for:

[0188] Traversing each of the first vertices through the vertex merging detection window to obtain an index of each of the first vertices and a spatial relationship between each of the first vertices;

[0189] Determine a spatial distance value between each first vertex and other first vertices based on the index of each first vertex and the spatial relationship between each first vertices;

[0190] Based on the index of each of the first vertices, determine the Euclidean distance value between each of the first vertices and the other first vertices;

[0191] Determine invalid vertices based on the indexes of the first vertices, the spatial relationship between the first vertices, and the topological structure of the oblique photography model to be compressed;

[0192] The first vertices to be merged are determined based on the spatial distance values ​​between each of the first vertices and the other first vertices, the Euclidean distance values ​​between each of the first vertices and the other first vertices, and the invalid vertices.

[0193] According to the data compression device 300 of the oblique photography model provided by the present invention, the compression module 320 is further used for:

[0194] A first root node in the oblique photography model to be compressed is identified; wherein the first root node corresponds to a tile representing the oblique photography model to be compressed.

[0195] According to the data compression device 300 of the oblique photography model provided by the present invention, the compression module 320 is further used for:

[0196] Determine a first root node to be merged according to an index corresponding to the first vertex to be merged and an index corresponding to each of the first vertices;

[0197] Create a new second root node, and add the child nodes and leaf nodes of the first root node to be merged to the new second root node;

[0198] According to the new second root node, updating the target information corresponding to the child nodes and leaf nodes of the first root node to be merged, to obtain updated target information;

[0199] Based on the updated target information, determining a second vertex corresponding to the oblique photography model to be compressed;

[0200] Based on the second vertex corresponding to the oblique photography model to be compressed, the compressed oblique photography model data is determined.

[0201] According to the data compression device 300 of the oblique photography model provided by the present invention, the compression module 320 is further used for:

[0202] According to the new second root node, updating the parent node information corresponding to the child nodes and leaf nodes of the first root node to be merged, to obtain updated parent node information; the updated parent node information is used to indicate that the child nodes and leaf nodes of the first root node to be merged point to the second root node;

[0203] According to the new second root node, the hierarchical structures corresponding to the child nodes and leaf nodes of the first root node to be merged are updated to obtain an updated hierarchical structure; the updated hierarchical structure is used to indicate that the child nodes and leaf nodes of the first root node to be merged correspond to the second root node;

[0204] According to the new second root node, merging the materials corresponding to the child nodes and leaf nodes of the first root node to be merged into the material of the second root node to obtain updated material information;

[0205] According to the new second root node, the textures corresponding to the child nodes and leaf nodes of the first root node to be merged are merged into the overall texture atlas, and the texture information of the second root node is updated based on the overall texture atlas to obtain updated texture information; the material and texture information corresponding to the child nodes and leaf nodes of the first root node to be merged are obtained based on the texture list and texture data of the oblique photography model data to be compressed, and the texture list and the texture data are obtained by parsing the OSGB data of the oblique photography model to be compressed;

[0206] The updated target information is determined according to the updated parent node information, the updated hierarchical structure, the updated material information, and the updated texture information.

[0207] According to a data compression device 300 for an oblique photography model provided by the present invention, the vertex attribute of each of the first vertices is represented by a floating point number, and the vertex attribute includes at least one of the following: position, normal, and texture coordinate; the method further includes:

[0208] quantizing the vertex attributes of each of the first vertices to obtain first vertex data in integer form;

[0209] The first vertex data in the integer form is compressed twice by using a prediction compression method to obtain compressed second vertex data; the prediction compression method includes: parallelogram difference or texture coordinate prediction;

[0210] The encoding length of the compressed second vertex data is allocated according to the distribution of the compressed second vertex data.

[0211] According to the data compression device 300 of the oblique photography model provided by the present invention, the secondary compression module is further used for:

[0212] Determine the texture data of the compressed OSGB oblique photography model data to be compressed;

[0213] The compressed texture data of the OSGB oblique photography model data to be compressed is stored as texture data in a Khronos texture container format.

[0214] According to a data compression device 300 of an oblique photography model provided by the present invention, the device further comprises: an index establishment module;

[0215] The index building module is used to:

[0216] Determine a second root node in the compressed oblique photography model data;

[0217] Merge the number of the second root nodes into a preset number, and create an index file corresponding to the second root nodes in the preset number;

[0218] Creating an index file for tiles other than the second root node within the preset number;

[0219] The total index is determined according to the index file corresponding to the second root node within the preset number and the index file corresponding to the tile other than the second root node within the preset number.

[0220] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the data compression method of the oblique photography model, and the method includes:

[0221] Get the open scene of the oblique photography model to be compressed Figure 2 Data in hexadecimal format OSGB;

[0222] Parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices;

[0223] Based on the resolution of the oblique photography model to be compressed, constructing a vertex merging detection window; target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed;

[0224] The first vertices of the oblique photography model to be compressed are traversed through the vertex merging detection window to determine the first vertices that need to be merged, and the data of the oblique photography model to be compressed is compressed based on the indexes corresponding to the first vertices that need to be merged to obtain compressed oblique photography model data; the indexes corresponding to the first vertices that need to be merged are determined based on the indexes corresponding to the first vertices.

[0225] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0226] On the other hand, the present invention further provides a computer program product, the computer program product comprising a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the data compression method of the oblique photography model provided by the above methods, the method comprising:

[0227] Get the open scene of the oblique photography model to be compressed Figure 2 Data in hexadecimal format OSGB;

[0228] Parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices;

[0229] Based on the resolution of the oblique photography model to be compressed, constructing a vertex merging detection window; target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed;

[0230] The first vertices of the oblique photography model to be compressed are traversed through the vertex merging detection window to determine the first vertices that need to be merged, and the data of the oblique photography model to be compressed is compressed based on the indexes corresponding to the first vertices that need to be merged to obtain compressed oblique photography model data; the indexes corresponding to the first vertices that need to be merged are determined based on the indexes corresponding to the first vertices.

[0231] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the data compression method of the oblique photography model provided by the above methods, the method comprising:

[0232] Get the open scene of the oblique photography model to be compressed Figure 2 Data in hexadecimal format OSGB;

[0233] Parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices;

[0234] Based on the resolution of the oblique photography model to be compressed, constructing a vertex merging detection window; target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed;

[0235] The first vertices of the oblique photography model to be compressed are traversed through the vertex merging detection window to determine the first vertices that need to be merged, and the data of the oblique photography model to be compressed is compressed based on the indexes corresponding to the first vertices that need to be merged to obtain compressed oblique photography model data; the indexes corresponding to the first vertices that need to be merged are determined based on the indexes corresponding to the first vertices.

[0236] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0237] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0238] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data compression method for an oblique photography model, characterized in that: include: Obtain the open scene graph binary format OSGB data of the oblique photography model to be compressed; Parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices; Based on the resolution of the oblique photography model to be compressed, constructing a vertex merging detection window; target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed; Traversing each of the first vertices of the oblique photography model to be compressed through the vertex merging detection window, determining the first vertices to be merged, and compressing the data of the oblique photography model to be compressed based on the indexes corresponding to the first vertices to be merged, to obtain compressed oblique photography model data; The index corresponding to the first vertices to be merged is determined based on the indexes corresponding to the first vertices; The step of traversing the first vertices of the oblique photography model to be compressed through the vertex merging detection window to determine the first vertices to be merged includes: Traversing each of the first vertices through the vertex merging detection window to obtain an index of each of the first vertices and a spatial relationship between each of the first vertices; Determine a spatial distance value between each first vertex and other first vertices based on the index of each first vertex and the spatial relationship between each first vertices; Based on the index of each of the first vertices, determine the Euclidean distance value between each of the first vertices and the other first vertices; Determine invalid vertices based on the indexes of the first vertices, the spatial relationship between the first vertices, and the topological structure of the oblique photography model to be compressed; The first vertices to be merged are determined based on the spatial distance values ​​between each of the first vertices and the other first vertices, the Euclidean distance values ​​between each of the first vertices and the other first vertices, and the invalid vertices.

2. The data compression method of the oblique photography model according to claim 1, characterized in that: The step of constructing a vertex merging detection window based on the resolution of the oblique photography model to be compressed includes: Determining the target size information according to the resolution of the oblique photography model to be compressed; the target size information is used to characterize the side length of a three-dimensional cube; The vertex merging detection window is determined based on the side length of the three-dimensional cube.

3. The data compression method of the oblique photography model according to claim 1, characterized in that: Before compressing the data of the oblique photography model to be compressed based on the index corresponding to the first vertex to be merged to obtain the compressed oblique photography model data, the method further includes: A first root node in the oblique photography model to be compressed is identified; wherein the first root node corresponds to a tile representing the oblique photography model to be compressed.

4. The data compression method of the oblique photography model according to claim 3, characterized in that: The step of compressing the data of the oblique photography model to be compressed based on the index corresponding to the first vertex to be merged to obtain compressed oblique photography model data includes: Determine a first root node to be merged according to an index corresponding to the first vertex to be merged and an index corresponding to each of the first vertices; Create a new second root node, and add the child nodes and leaf nodes of the first root node to be merged to the new second root node; According to the new second root node, updating the target information corresponding to the child nodes and leaf nodes of the first root node to be merged, to obtain updated target information; Based on the updated target information, determining a second vertex corresponding to the oblique photography model to be compressed; Based on the second vertex corresponding to the oblique photography model to be compressed, the compressed oblique photography model data is determined.

5. The data compression method of the oblique photography model according to claim 4, characterized in that: The updating of target information corresponding to the child nodes and leaf nodes of the first root node to be merged according to the new second root node to obtain updated target information includes: According to the new second root node, updating the parent node information corresponding to the child nodes and leaf nodes of the first root node to be merged, to obtain updated parent node information; the updated parent node information is used to indicate that the child nodes and leaf nodes of the first root node to be merged point to the second root node; According to the new second root node, the hierarchical structures corresponding to the child nodes and leaf nodes of the first root node to be merged are updated to obtain an updated hierarchical structure; the updated hierarchical structure is used to indicate that the child nodes and leaf nodes of the first root node to be merged correspond to the second root node; According to the new second root node, merging the materials corresponding to the child nodes and leaf nodes of the first root node to be merged into the material of the second root node to obtain updated material information; According to the new second root node, the textures corresponding to the child nodes and leaf nodes of the first root node to be merged are merged into the overall texture atlas, and the texture information of the second root node is updated based on the overall texture atlas to obtain updated texture information; the material and texture information corresponding to the child nodes and leaf nodes of the first root node to be merged are obtained based on the texture list and texture data of the oblique photography model data to be compressed, and the texture list and the texture data are obtained by parsing the OSGB data of the oblique photography model to be compressed; The updated target information is determined according to the updated parent node information, the updated hierarchical structure, the updated material information, and the updated texture information.

6. The data compression method of the oblique photography model according to any one of claims 1 to 5, characterized in that: The vertex attribute of each of the first vertices is represented by a floating point number, and the vertex attribute includes at least one of the following: position, normal, and texture coordinate; the method further includes: quantizing the vertex attributes of each of the first vertices to obtain first vertex data in integer form; The first vertex data in the integer form is compressed twice by using a prediction compression method to obtain compressed second vertex data; the prediction compression method includes: parallelogram difference or texture coordinate prediction; The encoding length of the compressed second vertex data is allocated according to the distribution of the compressed second vertex data.

7. The data compression method of the oblique photography model according to any one of claims 1 to 5, characterized in that: The method further comprises: Determine the texture data of the compressed OSGB oblique photography model data to be compressed; The compressed texture data of the OSGB oblique photography model data to be compressed is stored as texture data in a Khronos texture container format.

8. The data compression method of the oblique photography model according to any one of claims 1 to 5, characterized in that: The method further comprises: Determine a second root node in the compressed oblique photography model data; Merge the number of the second root nodes into a preset number, and create an index file corresponding to the second root nodes in the preset number; Creating an index file for tiles other than the second root node within the preset number; The total index is determined according to the index file corresponding to the second root node within the preset number and the index file corresponding to the tile other than the second root node within the preset number.

9. A data compression device for an oblique photography model, characterized in that: include: A parsing module, used for obtaining the open scene graph binary format OSGB data of the oblique photography model to be compressed; Parsing the OSGB data of the oblique photography model to be compressed to obtain a vertex list and an index list of the oblique photography model data to be compressed, and creating a linked list based on the vertex list and the index list; the linked list stores at least two first vertices included in the vertex list and the indexes corresponding to the first vertices; A compression module, used for constructing a vertex merging detection window based on the resolution of the oblique photography model to be compressed; The target size information of the vertex merging detection window is determined based on the resolution of the oblique photography model to be compressed; Traversing each of the first vertices of the oblique photography model to be compressed through the vertex merging detection window, determining the first vertices to be merged, and compressing the data of the oblique photography model to be compressed based on the indexes corresponding to the first vertices to be merged, to obtain compressed oblique photography model data; The index corresponding to the first vertices to be merged is determined based on the indexes corresponding to the first vertices; The method of traversing each first vertices of the oblique photography model to be compressed through the vertex merging detection window to determine the first vertices that need to be merged includes: traversing each first vertices through the vertex merging detection window to obtain the index of each first vertices and the spatial relationship between each first vertices; determining the spatial distance value between each first vertex and other first vertices based on the index of each first vertex and the spatial relationship between each first vertices; determining the Euclidean distance value between each first vertex and the other first vertices based on the index of each first vertex; determining invalid vertices based on the index of each first vertex, the spatial relationship between each first vertices, and the topological structure of the oblique photography model to be compressed; and determining the first vertices that need to be merged based on the spatial distance value between each first vertex and other first vertices, the Euclidean distance value between each first vertex and the other first vertices, and the invalid vertices.

Citation Information

Patent Citations

  • Oblique photography slice optimization method based on osgb, terminal, device and medium

    CN114943810A

  • Inclined photography spatial index construction method considering Web end rapid rendering

    CN115330933A