Data processing methods for oblique photography
By merging root nodes and thinning vertices in the oblique photogrammetry data, target data is generated, which solves the problem of slow loading of large-area oblique photogrammetry data and improves loading performance and efficiency.
Patent Information
- Application Number
- CN202211728257.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In an internet environment, when the oblique photogrammetry data area is large, the number of slice files in the top-level node is huge, which leads to slow data loading and browser crashes, affecting the user's interactive experience.
By merging the root nodes of multiple original slices, thinning the vertices, and processing the texture image, target data for the merged slices is generated, thereby reducing the number of slices and the amount of data, and improving loading performance.
It effectively reduces the amount of video memory used, decreases the number of slice requests, improves data loading speed and efficiency, and enhances the user experience.
Smart Images

Figure CN116129019B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional data processing, in particular to a data processing method for oblique photography. BACKGROUND
[0002] With the development of Internet technology, various resource information is highly shared, and information sharing through Web services provided by the Internet has become a common way. At present, smart cities and digital earth are developing rapidly in the field of three-dimensional technology, and the rendering and display of oblique photography three-dimensional models on the Web is a hot issue in Web three-dimensional visualization today.
[0003] When the oblique photography data region is large, the number of slice files of the top node is huge, and how to enable the oblique photography data produced in the Internet environment to be quickly and stably loaded and smoothly interacted is very important. SUMMARY
[0004] The present application aims to at least solve one of the above technical problems to some extent.
[0005] To this end, the present application provides a data processing method for oblique photography, which comprises the following steps:
[0006] obtaining original data of oblique photography, wherein the original data comprises a plurality of original slices and texture images for rendering each original slice, and each original slice comprises a plurality of vertices for sub-dividing the original slice;
[0007] merging the plurality of original slices to obtain a merged slice;
[0008] performing vertex thinning on the vertices in the merged slice to obtain each target vertex after thinning in the merged slice, and performing image processing on the texture images for rendering the merged slice to obtain target textures corresponding to each merged slice;
[0009] perform vertex decimation on the vertices in the merged slice to obtain each target vertex in the merged slice after decimation, and perform image processing on a texture image rendering the merged slice to obtain a target texture corresponding to the merged slice;
[0010] generate target data of the tilt photography based on the target vertices of the merged slice and the target texture rendering the merged slice, to perform display of a three-dimensional tilt photography image at a client based on the target data.
[0011] Optionally, the merging of the plurality of original slices to obtain a merged slice comprises: reading the original data to reconstruct an LOD node model of each original slice, wherein the LOD node model comprises a plurality of layers of nodes in a tree structure, and each layer of nodes comprises vertices used to render an image of a corresponding resolution; performing root node merging on child layer nodes in the LOD node model using a merging function to obtain a merged root node in a target model, wherein the first vertices included in the merged root node comprise the vertices included in each child layer node before merging; determining a center point of the target model according to an outer bounding box of the target model obtained based on the vertices included in the merged root node; updating vertex positions of the vertices included in each node in the target model according to the center point of the target model; and determining the merged slice based on the vertex positions of the vertices included in the target model.
[0012] Optionally, the LOD node model adopts a quadtree structure, and the method further comprises: recursively checking, from a top layer, whether a missing child node of the quadtree structure exists in a layer of nodes to be merged; and copying a parent node as the missing child node in the case where the missing child node exists.
[0013] Optionally, the performing of vertex decimation on the vertices in the merged slice to obtain each target vertex in the merged slice after decimation comprises: obtaining vertex information of the vertices in the merged slice, wherein the vertex information comprises vertex positions and vertex index data; and performing decimation on the vertices in the merged slice based on the vertex information using a vertex clustering algorithm to obtain each target vertex in the merged slice after decimation.
[0014] Optionally, the vertex information further comprises texture coordinates used to indicate pixel points in a rendering image; and the method further comprises updating the texture coordinates according to the vertex positions of each target vertex after decimation.
[0015] Optionally, the image processing of the texture image rendered by the merged slice to obtain the target texture corresponding to each of the merged slices comprises: reducing the resolution of the texture image rendered by the merged slice, and / or image compressing the texture image rendered by the merged slice to obtain the target texture corresponding to each of the merged slices.
[0016] Optionally, the reducing the resolution of the texture image rendered by the merged slice comprises: reducing the image size of the texture image rendered by the merged slice according to a set scaling factor, wherein the value of the scaling factor is less than 1; and determining the pixel value of each pixel in the target texture based on the reduced image size and using a cubic spline interpolation function.
[0017] Optionally, the image compressing of the texture image rendered by the merged slice comprises: performing compression processing on the texture image according to a set compression mode and a set picture quality factor, and using a set compression algorithm.
[0018] Optionally, the target data comprises rendering data; and the method further comprises: generating a single primitive data block based on vertex information of at least two target vertices, wherein the vertex information comprises one or more combinations of vertex coordinates, vertex indexes, texture coordinates, and normal vector structures; performing texture image merging on at least two target textures required for rendering the at least two target vertices to obtain a single picture data block; updating the texture coordinates in the single primitive data block based on the image size of the single picture data block and the image size of the at least two target textures before the texture image merging; and generating rendering data for instructing the GPU of the client to perform rendering according to the single primitive data block and the single picture data block.
[0019] Optionally, the method further comprises: quantizing the vertex information of the floating-point data type in the single primitive data block to convert the vertex information into vertex information of the integer data type.
[0020] The data processing method for tilt photography provided in the embodiments of the present application comprises the following steps: obtaining original data for tilt photography, wherein the original data comprises a plurality of original slices and texture images for rendering each original slice, each original slice comprises a plurality of vertices for splitting the original slice; merging the plurality of original slices to obtain merged slices; performing vertex thinning on the vertices in the merged slices to obtain each target vertex in the merged slices after thinning, and performing image processing on the texture images for rendering the merged slices to obtain target textures corresponding to each merged slice; generating target data for tilt photography based on the target vertices of the merged slices and the target textures for rendering the merged slices, and displaying a three-dimensional tilt photography image on a client based on the target data. Thus, on the one hand, the number of slices is reduced, and the number of requests for slices during data loading is reduced; on the other hand, the data volume of the data for tilt photography is reduced, the video memory occupation of the data for tilt photography is effectively reduced, and the loading performance and efficiency are improved.
[0021] The second aspect of the present application provides a data processing device for tilt photography, comprising:
[0022] The acquisition module is configured to acquire original data for tilt photography, wherein the original data comprises a plurality of original slices and texture images for rendering each original slice, and each original slice comprises a plurality of vertices for splitting the original slice.
[0023] The first merging module is configured to merge the plurality of original slices to obtain merged slices.
[0024] The thinning module is configured to perform vertex thinning on the vertices in the merged slices to obtain each target vertex in the merged slices after thinning.
[0025] The first processing module is configured to perform image processing on the texture images for rendering the merged slices to obtain target textures corresponding to each merged slice.
[0026] The first generation module is configured to generate target data for tilt photography based on the target vertices of the merged slices and the target textures for rendering the merged slices, and display a three-dimensional tilt photography image on a client based on the target data.
[0027] Optionally, the merging of the plurality of original slices to obtain the merged slice comprises: reading the original data to reconstruct a LOD node model of each of the original slices, wherein the LOD node model comprises a plurality of layers of nodes in a tree structure, and each layer of nodes comprises vertices used for rendering an image of a corresponding resolution; performing root node merging on child layer nodes in the LOD node model using a merging function to obtain a merged root node in a target model, wherein the first vertices included in the merged root node comprise vertices included in each of the child layer nodes before merging; determining a center point of the target model according to an outer bounding box of the target model obtained from the vertices included in the merged root node; updating vertex positions of the vertices included in each node in the target model according to the center point of the target model; and determining the merged slice based on the vertex positions of the vertices included in the target model.
[0028] Optionally, the LOD node model adopts a quadtree structure, and the method further comprises: recursively checking, from a top layer of the LOD node model, whether a missing child node of the quadtree structure exists in a layer of nodes to be merged; and copying a parent node as the missing child node in a case where the missing child node exists.
[0029] Optionally, the vertex thinning of the vertices in the merged slice to obtain each target vertex after thinning in the merged slice comprises: obtaining vertex information of the vertices in the merged slice, wherein the vertex information comprises vertex positions and vertex index data; and performing thinning on the vertices in the merged slice based on the vertex information using a vertex clustering algorithm to obtain each target vertex after thinning in the merged slice.
[0030] Optionally, the vertex information further comprises texture coordinates used for indicating pixel points used for rendering in a rendered image; and the method further comprises: updating the texture coordinates according to the vertex positions of the target vertices after thinning.
[0031] Optionally, the image processing of the texture image rendered for the merged slice to obtain a target texture corresponding to each of the merged slices comprises: reducing a resolution of the texture image rendered for the merged slice, and / or performing image compression on the texture image rendered for the merged slice to obtain the target texture corresponding to each of the merged slices.
[0032] Optionally, the reducing of the resolution of the texture image rendered for the merged slice comprises: reducing an image size of the texture image rendered for the merged slice according to a set scaling factor, wherein a value of the scaling factor is less than 1; and determining pixel values of each pixel in the target texture based on the reduced image size using a cubic spline interpolation function.
[0033] Optionally, the image compression of the texture image of the rendering of the merged slice comprises: compressing the texture image according to a set compression mode and a set picture quality factor, and using a set compression algorithm.
[0034] Optionally, the target data comprises rendering data; and the method further comprises: generating a single primitive data block based on vertex information of at least two target vertices, wherein the vertex information comprises one or more combinations of vertex coordinates, vertex indexes, texture coordinates, and normal vector structures; performing texture image merging on at least two target textures required for rendering of the at least two target vertices to obtain a single picture data block; updating texture coordinates in the single primitive data block based on an image size corresponding to the single picture data block and image sizes of the at least two target textures before the texture image merging; and generating rendering data for instructing the GPU of the client to perform rendering based on the single primitive data block and the single picture data block.
[0035] The data processing apparatus for tilt photography according to the embodiments of the present application comprises: acquiring original data of tilt photography, wherein the original data comprises a plurality of original slices and texture images for rendering of the original slices, and each original slice comprises a plurality of vertices for splitting the original slice; performing root node merging on the plurality of original slices to obtain merged slices; performing vertex thinning on the vertices in the merged slices to obtain target vertices in the merged slices after the vertex thinning, and performing image processing on texture images of the rendering of the merged slices to obtain target textures corresponding to the merged slices; and generating target data of tilt photography based on the target vertices of the merged slices and the target textures of the rendering of the merged slices, so as to perform display of a three-dimensional tilt photography image based on the target data on a client. In this way, on the one hand, the number of slices is reduced, and the number of requests for the slices during data loading is reduced; on the other hand, the data amount of the data of tilt photography is reduced, the memory occupation of the data of tilt photography is effectively reduced, and the loading performance and efficiency are improved.
[0036] The fourth aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data processing method for tilt photography according to the first aspect.
[0037] The fifth aspect of the present application provides a non-transitory computer readable storage medium having a computer program stored thereon, wherein the program is executable by a processor to implement the data processing method for tilt photography according to the first aspect.
[0038] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS
[0039] The above and / or additional aspects and advantages of the present application will become apparent and more readily appreciated from the following description, taken in conjunction with the accompanying drawings, in which:
[0040] Figure 1 A flowchart of a data processing method for oblique photography provided by Embodiment One of the present application;
[0041] Figure 2 A flowchart of a data processing method for oblique photography provided by Embodiment Two of the present application;
[0042] Figure 3 A flowchart of a data processing method for oblique photography provided by Embodiment Three of the present application;
[0043] Figure 4 A flowchart of a data processing method for oblique photography provided by the present application;
[0044] Figure 5 A structural diagram of a data processing device for oblique photography provided by Embodiment Four of the present application;
[0045] Figure 6 A structural diagram of an electronic device provided by Embodiment Five of the present application. DETAILED DESCRIPTION
[0046] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.
[0047] Oblique photography technology is a high-tech developed in the field of international photogrammetry in the past ten years. This technology synchronously collects images from one vertical and four oblique and five different angles to obtain rich high-resolution textures of building top surfaces and side views. It not only can truly reflect the situation of ground objects and obtain high-precision texture information of the object side, but also can generate a real three-dimensional city model through advanced positioning, fusion, modeling and other technologies. This technology has been widely used in emergency command, national security, urban management, smart city, digital twin and other industries.
[0048] With the development of internet technology, various resources and information are highly shared. Information sharing through web services provided by the internet has become a common practice. Currently, smart cities and digital earth are developing rapidly in the field of 3D technology. The rendering and display of oblique photogrammetry 3D models on the web is a hot topic in web 3D visualization. When the oblique photogrammetry data area is large, the top-level node can easily reach hundreds or thousands of tile files. When browsing oblique photogrammetry data in the entire field of view, requesting the top-level tile files one by one to load onto the map will cause the data to be loaded and displayed piece by piece according to the tile node during the loading process. Loading all the data usually takes more than one minute. At the same time, there are rendering stuttering issues during dragging and interaction. Moreover, when the data is too large, it is also prone to browser crashes, resulting in a poor browsing and interaction experience for users.
[0049] To address the aforementioned issues, this application proposes a data processing method for oblique photography.
[0050] The following is combined with Figure 1 This application provides a detailed description of the data processing method for oblique photography.
[0051] The embodiments of this application can be applied to the server side.
[0052] Figure 1 This is a schematic flowchart of the oblique photography data processing method provided in Embodiment 1 of this application.
[0053] like Figure 1 As shown, the data processing method for this oblique photography includes the following steps:
[0054] Step 101: Obtain the raw data from the oblique photogrammetry.
[0055] The original data may include multiple original slices and texture images used to render each original slice.
[0056] Each original slice may include multiple vertices used to partition the original slice.
[0057] In this embodiment of the application, the raw data can be in OSGB (Open Scene Gragh Binary, OSG binary format) format.
[0058] It should be noted that the OSGB format uses JPEG (Joint Photographic Experts Group) format texture images by default. Therefore, in this application, the texture images used to render each original slice can be in JPEG format.
[0059] In the embodiment of the present application, the original data of the oblique photography can be acquired, for example, the original data of the oblique photography can be acquired by reading the metadata of the original data of the oblique photography, wherein the metadata can include data name, data format, etc., which is not limited in the present application.
[0060] In step 102, the root node merging is performed on the plurality of original slices to obtain the merged slice.
[0061] In the embodiment of the present application, the root node merging can be performed on the plurality of original slices to obtain the merged slice.
[0062] For example, the top layer reconstruction processing can be performed on the original data, and the plurality of original slices can be merged to obtain the merged slice, that is, the coarse-grained data is generated according to the fine-grained data.
[0063] Therefore, the root node merging is performed on the plurality of original slices to obtain the merged slice, which can reduce the number of slices, and further reduce the request times of the slices when the data loading is performed on the client, so as to improve the speed of the data loading.
[0064] In step 103, the vertex thinning is performed on the vertex in the merged slice to obtain the target vertex after the thinning in the merged slice, and the image processing is performed on the texture image for rendering the merged slice to obtain the target texture corresponding to each merged slice.
[0065] In the embodiment of the present application, the vertex thinning can be performed on the vertex in the merged slice to obtain the target vertex after the thinning in the merged slice.
[0066] It can be understood that the vertex thinning is performed on the vertex in the merged slice, and the target vertex can be obtained, so as to improve the data processing speed subsequently.
[0067] In the embodiment of the present application, the image processing can also be performed on the texture image for rendering the merged slice to obtain the target texture corresponding to each merged slice.
[0068] As a possible implementation manner, the resolution of the texture image for rendering the merged slice can be reduced, for example, the scaling algorithm based on the pixel area can be used to reduce the resolution of the texture image for rendering the merged slice.
[0069] In order to reduce the resolution of the texture image, in a possible implementation manner of the embodiment of the present application, the texture image for rendering the merged slice can be reduced in size according to the set scaling factor, wherein the value of the scaling factor is less than 1; and based on the reduced image size, the cubic spline interpolation function can be used to determine the pixel value of each pixel in the target texture.
[0070] In the embodiments of the present application, the set scaling factor can be a pre-set image size reduction ratio, and the value of the scaling factor is less than 1, for example, the scaling factor can be 1 / 2, 1 / 3, etc., which is not limited in the present application.
[0071] As an example, assuming that the scaling factor is r, the image size of the texture image is m*n, and the pixel value of each pixel of the texture image is represented as Img, the texture image of the rendered merged slice is reduced in image size according to the set scaling factor r, and the reduced image size is m' * n', wherein:
[0072] m' = m * r; (1)
[0073] n' = n * r; (2)
[0074] Based on the reduced image size, a cubic spline interpolation function Resize() can be used to determine the pixel value Img' of each pixel in the target texture:
[0075] Img' = Resize(Img, m', n'); (3)
[0076] Thus, by reducing the resolution of the texture image for rendering the merged slice, the memory consumption and bandwidth occupation of the texture image can be effectively reduced, and the running efficiency can be improved.
[0077] As another possible implementation, the texture image of the rendered merged slice can be compressed to obtain the target texture corresponding to each merged slice.
[0078] In order to realize the image compression of the texture image of the rendered merged slice, in a possible implementation of the embodiments of the present application, a set compression algorithm can be used to compress the texture image according to a set compression mode and a set picture quality factor.
[0079] In the embodiments of the present application, the set compression mode can be pre-set, for example, it can be texture compression.
[0080] In the embodiments of the present application, the set picture quality factor can be pre-set, for example, it can be 75, 80, etc., which is not limited in the present application.
[0081] In the embodiments of the present application, the set compression algorithm is pre-set, for example, the compression algorithm is WebP.
[0082] As an example, assuming the uncompressed texture image is named "Texture", after selecting a compression mode for texture compression, and based on a set image quality factor of "quatility", the set compression algorithm is used to compress the texture image, resulting in the processed texture image "Texture'".
[0083] Texture'=WebP(Texture,quatility); (4)
[0084] Understandably, compressing the texture image used to render the merged slices can effectively reduce the video memory usage of the oblique photogrammetry data, thereby improving operating efficiency and stability.
[0085] Step 104: Based on the target vertices of the merged slice and the target texture of the rendered merged slice, generate target data for oblique photography, and display the 3D oblique photography image on the client based on the target data.
[0086] In this embodiment of the application, target data for oblique photography can be generated based on the target vertices of the merged slice and the target texture of the rendered merged slice, so that the three-dimensional oblique photography image can be displayed on the client based on the generated target data.
[0087] The oblique photogrammetry data processing method of this application embodiment obtains the raw oblique photogrammetry data, which includes multiple raw slices and texture images for rendering each raw slice. Each raw slice includes multiple vertices for partitioning the raw slice. The root nodes of the multiple raw slices are merged to obtain merged slices. Vertex thinning is performed on the vertices in the merged slice to obtain target vertices in the merged slice. Image processing is performed on the texture images used to render the merged slice to obtain target textures corresponding to each merged slice. Based on the target vertices of the merged slice and the target textures used to render the merged slice, target data for oblique photogrammetry is generated, and a 3D oblique photogrammetry image is displayed on the client based on the target data. Therefore, on the one hand, the number of slices is reduced, reducing the number of slice requests during data loading; on the other hand, the data volume of the oblique photogrammetry data is reduced, effectively reducing the video memory usage of the oblique photogrammetry data and improving loading performance and efficiency.
[0088] To clearly illustrate how multiple original slices are merged into a merged slice by merging the root nodes in the above embodiments of this application, this application also proposes a data processing method for oblique photography.
[0089] Figure 2 This is a schematic flowchart of the oblique photography data processing method provided in Embodiment 2 of this application.
[0090] like Figure 2As shown, the data processing method of the oblique photography can include the following steps:
[0091] In step 201, original data of the oblique photography is acquired.
[0092] The execution process of step 201 can refer to the execution process of any embodiment of the present application, which is not described herein.
[0093] In step 202, the original data is read to reconstruct LOD node models of each original slice.
[0094] The LOD (Levels of Detail) node model includes tree-shaped multi-layer nodes; the tree shape can include a quadtree, an octree, etc., which is not limited in the present application.
[0095] The vertices contained in each layer node can be used to render images of corresponding resolutions.
[0096] In the embodiments of the present application, the original data can be read to reconstruct the LOD node models of each original slice.
[0097] In the case where the LOD node model adopts a quadtree structure to organize each node in the model, as a possible implementation, the LOD node model can be recursively checked from the top layer to check whether the nodes in the level to be merged are missing the child nodes of the quadtree structure; in the case where there is a missing, the parent node can be copied as the missing child node.
[0098] Thus, the missing nodes in the LOD node model are supplemented to improve the accuracy of the data.
[0099] In step 203, the child layer nodes in the LOD node model are merged using a merging function to obtain a merged root node in the target model, wherein the first vertex contained in the merged root node includes the vertices contained in each child layer node before merging.
[0100] In the embodiments of the present application, the child layer node can indicate the child node corresponding to the parent node in the LOD node model.
[0101] In the embodiments of the present application, the first vertex can be the vertex contained in the merged root node, and the first vertex can include the vertices contained in each child layer node before merging.
[0102] In the embodiments of the present application, the merging function can be used for the merged root node, for example, the merging function is M().
[0103] In the embodiments of the present application, the child layer nodes in the LOD node model can be merged using the merging function to obtain the merged root node in the target model.
[0104] For example, for the (i+1)th level root node in the LOD node model, including N (i+1)(4j-1) N (i+1)(4j) N (i+1)(4j+1) N (i+1)(4j+2) The root node of this level is used to generate node N in the i-th level LOD node model using the merge function M(). ij :
[0105] N ij =M(N) (i+1)(4j-1) N (i+1)(4j) N (i+1)(4j+1) N (i+1)(4j+2) (5)
[0106] Where i represents the level and j represents the node number of the i-th level.
[0107] Step 204: Determine the center point of the target model based on the bounding box of the target model obtained by merging the vertices contained in the root node.
[0108] In this embodiment of the application, the bounding box of the vertices contained in the merged root node can be obtained, and the center point of the target model can be determined based on the bounding box.
[0109] For example, the bounding box can be calculated using the `box()` function based on the coordinates of the vertices contained in the merged root node. For instance, before merging, the coordinates of each vertex with the origin of the 3D model scene are P1, P2, ... P... i , ..., P n Where i∈[1,n], and i is an integer, and n is the number of vertices, the bounding box of the vertices contained in the root node is:
[0110] [x min ,y min ,z min ,x max ,y max ,z max ] = box(P1,P2,…,P i , ..., P n (6)
[0111] Where, x min The minimum value in the X-axis direction, y min The minimum value in the Y-axis direction, z min The minimum value in the Y-axis direction, x max The maximum value in the Y-axis direction, Y max The maximum value in the Y-axis direction, Z max This represents the maximum value in the Z-axis direction.
[0112] Therefore, the center point C of the target model can be determined based on the bounding box. m (xc y c z c ):
[0113]
[0114] Step 205, updating the vertex positions of the vertices contained in each node of the target model according to the center point of the target model.
[0115] In the embodiments of the present application, the vertex positions of the vertices contained in each node of the target model can be updated according to the center point of the target model.
[0116] For example, the vertex positions of the vertices contained in each node of the target model relative to the center point of the target model can be recalculated according to the three-dimensional model scene origin point, the center point of the target model, and an offset function:
[0117] P i ′=transform(Origin,C m ,p i ); (8)
[0118] wherein, Origin represents the coordinate reference origin of the model scene, P i is the i-th vertex coordinate with Origin as the origin, C m is the center point of the target model, P i ′ is the vertex position of the vertices contained in each node of the target model relative to the center point of the target model, i∈[1,n], and i is an integer, and n is the number of vertices.
[0119] Step 206, determining the merged slice based on the vertex positions of the vertices contained in the target model.
[0120] In the embodiments of the present application, the merged slice can be determined based on the vertex positions of the vertices contained in the target model.
[0121] Step 207, performing vertex thinning on the vertices in the merged slice to obtain each target vertex in the merged slice after thinning, and performing image processing on the texture image of the rendered merged slice to obtain the target texture corresponding to each merged slice.
[0122] Step 208, generating the target data of the oblique photography based on the target vertices of the merged slice and the target texture of the rendered merged slice, to perform the display of the three-dimensional oblique photography image on the client based on the target data.
[0123] The execution process of steps 207 to 208 can refer to the execution process of any embodiment of the present application, which will not be repeated here.
[0124] The data processing method for oblique photography provided in the embodiment of the application can reconstruct the LOD node model of each original slice by reading the original data, wherein the LOD node model comprises tree-shaped multi-layer nodes, and the vertices contained in each layer node are used to render an image of corresponding resolution; the child layer nodes in the LOD node model are merged by using a merging function to obtain a merged root node in the target model, wherein the first vertices contained in the merged root node comprise the vertices contained in each child layer node before merging; the center point of the target model is determined according to the outer bounding box of the vertices contained in the merged root node; the vertex positions of the vertices contained in each node in the target model are updated according to the center point of the target model; and the merged slice is determined based on the vertex positions of the vertices contained in the target model. Thus, based on the reconstructed LOD node model, the plurality of original slices can be merged, and the merged slice can be obtained.
[0125] In order to clearly illustrate how the vertices in the merged slice are thinned out to obtain each target vertex in the merged slice in the above embodiment of the application, the application further provides a data processing method for oblique photography.
[0126] Figure 3 The flowchart of the data processing method for oblique photography provided in the third embodiment of the application.
[0127] As shown in Figure 3 , the data processing method for oblique photography can comprise the following steps:
[0128] Step 301: obtaining original data for oblique photography.
[0129] Step 302: merging root nodes of a plurality of original slices to obtain a merged slice.
[0130] The execution process of steps 301 to 302 can refer to the execution process of any embodiment of the application, which will not be described herein.
[0131] Step 303: obtaining vertex information for the vertices in the merged slice, wherein the vertex information comprises vertex position and vertex index data.
[0132] In the embodiment of the application, the vertex information can comprise vertex position and vertex index data.
[0133] In the embodiment of the application, the vertex information can be obtained for the vertices in the merged slice.
[0134] Step 304: thinning out the vertices in the merged slice based on the vertex information by using a vertex clustering algorithm to obtain each target vertex in the merged slice after thinning out.
[0135] In this embodiment of the application, a vertex clustering algorithm can be used to thin out the vertices in the merged slice based on the vertex information, so as to obtain each target vertex in the merged slice after thinning.
[0136] For example, before thinning the vertices in the merged slice, multiple irregular triangular patches are generated based on the vertex information in the merged slice, and the merged slice can be composed of these multiple irregular triangular patches:
[0137] M=F(Δ0,Δ1,…,Δ i , ..., Δ m (9)
[0138] Where F is the model building function, Δ i Let i be the i-th triangular facet, i∈[1,m], and i is an integer. The number of triangular facets is m+1.
[0139] Vertices in merged slices can be thinned using Open3D vertex clustering algorithms based on voxel grid, average, or surface distance vertex clustering methods.
[0140] M′=Simplify(M); (10)
[0141] Therefore, we can obtain the target vertices after thinning in the merged slice.
[0142] In one possible implementation of this application embodiment, the vertex information may further include texture coordinates for indicating the pixels used for rendering in the rendered image; the texture coordinates can be updated according to the vertex positions of each target vertex after thinning.
[0143] As an example, based on the vertex positions of each target vertex after thinning, the UV reconstruction method can be used to generate texture coordinates consistent with the vertex positions of the target vertices, thereby achieving texture coordinate updates.
[0144] Step 305: Perform image processing on the texture image of the rendered merged slice to obtain the target texture corresponding to each merged slice.
[0145] Step 306: Based on the target vertices of the merged slice and the target texture of the rendered merged slice, generate target data for oblique photography, and display the 3D oblique photography image on the client based on the target data.
[0146] The execution process of steps 305 to 306 can be found in the execution process of any embodiment of this application, and will not be described in detail here.
[0147] In a possible implementation of the embodiment of the application, in the case that the target data includes rendering data, a single primitive data block is generated based on vertex information of at least two target vertices, wherein the vertex information includes one or more combinations of vertex coordinates, vertex indexes, texture coordinates, and normal vector structures; texture image merging is performed on at least two target textures required for rendering of the at least two target vertices to obtain a single picture data block; texture coordinates in the single primitive data block are updated based on an image size corresponding to the single picture data block and image sizes of the at least two target textures before the texture image merging; and rendering data used to instruct a GPU of a client to perform rendering is generated based on the single primitive data block and the single picture data block.
[0148] In the embodiment of the application, the vertex information can include one or more combinations of vertex coordinates, vertex indexes, texture coordinates, and normal vector structures.
[0149] In the embodiment of the application, a single primitive data block can be generated based on vertex information of at least two target vertices.
[0150] For example, the vertex information of the at least two target vertices can be correspondingly merged to generate the single primitive data block. For example, assuming that there are n target vertices, vertex information B i of the i th target vertex is:
[0151] B i = V i + I i + UV i + N i ; (11)
[0152] wherein V i is vertex coordinates of the i th target vertex, I i is a vertex index of the i th target vertex, UV i is texture coordinates of the i th target vertex, and N i is a normal vector of the i th target vertex, i ∈ [0, n], and i is an integer, and n is the number of target vertices.
[0153] It should be noted that "+" in formula (11) is only used to represent combination of the contents on both sides, that is, formula (11) represents that the vertex information B i of the i th target vertex is composed of V i , I i , UV i , and N i .
[0154] The single primitive data block generated based on the vertex information of the n target vertices can be:
[0155]
[0156] Wherein, "+" only means to combine the content on both sides.
[0157] In the embodiment of the present application, the texture image merging can be performed according to at least two target textures required for rendering at least two target vertices to obtain a single picture data block.
[0158] For example, assuming that n target textures Q1, Q2, … Q i , …, Q T are required for rendering target vertices, and i∈[1, T], and i is an integer, T is the number of target textures, the n target textures are merged into a single picture data block:
[0159] [Q1+Q2+…+Q i +…+Q T ];
[0160] In the embodiment of the present application, the texture coordinates in the single primitive data block can be updated based on the image size corresponding to the single picture data block and the image size of the at least two target textures before the texture image merging.
[0161] For example, assuming that the texture coordinates in the single primitive data block before the texture image merging are:
[0162] (UV 10 ,UV 11 ,…UV 1i ,…,UV 20 ,UV 21 ,…UV 2i ,…,…,UV T0 ,UV T1 ,…,UV Ti ,…)
[0163] Wherein, the number of target textures is T, and the texture coordinates corresponding to the i-th target texture before the texture image merging are:
[0164] UV′=combine(UV ij ,m,n,m i ,n i ); (12)
[0165] Wherein, UV ij represents the j-th texture coordinate of the i-th target texture, m×n represents the image size of the single picture data block obtained after the texture image merging of the target texture picture, m i ×n i represents the image size of the i-th target texture image, and UV ij ' represents UVij The new texture coordinates after the texture image merging.
[0166] In a possible implementation of the embodiments of the present application, the rendering data for instructing the GPU (Graphics Processing Unit) of the client to perform rendering can be generated according to the single primitive data block and the single picture data block.
[0167] In this way, the rendering data can be compressed to reduce the computing resource overhead of the GPU.
[0168] In another possible implementation of the embodiments of the present application, the vertex information of the floating-point data type in the single primitive data block can also be quantized to be converted into vertex information of the integer data type.
[0169] For example, the numerical data of the vertex coordinates, the texture coordinates and the normal vector of the single primitive data block are read, and based on the quantization bit number and the compression level, the floating-point data can be encoded into integer data by using the Draco numerical encoding mode. For example, before encoding the floating-point data, k floating-point values v1, v2, …, vk are recorded as: i k V = (v1, v2, …, vk) (13)
[0170] V = (v1, v2, …, vk) (13) i k V = (v1, v2, …, vk) (13)
[0171] The numerical values of the vertex coordinates of the single primitive data block are encoded by using the encoding function E() to encode the floating-point data into integers:
[0172] V' = E(V, level, quantization) (14)
[0173] wherein level is the compression level, quantization is the quantization bit number, and V' is the encoded vertex coordinates of the single primitive data block.
[0174] In this way, the vertex information of the floating-point data type in the single primitive data block is quantized to be converted into vertex information of the integer data type, which can improve the computing and processing capabilities of the CPU and improve the running efficiency.
[0175] The data processing method for oblique photography provided by the embodiments of the present application can obtain vertex information by processing the vertex in the merged slice, wherein the vertex information comprises vertex position and vertex index data; and can obtain each target vertex in the merged slice after vertex thinning by processing the vertex in the merged slice based on the vertex information using a vertex clustering algorithm. Thus, the vertex thinning of the vertex in the merged slice can be realized, and each target vertex in the merged slice after vertex thinning can be obtained.
[0176] The data processing method for oblique photography provided by the embodiments of the present application will be described in detail below with examples.
[0177] As an example, Figure 4 The flowchart of the data processing method for oblique photography provided by the present application can comprise five modules.
[0178] 1) Root node merging module
[0179] 1.1) Reconstructing the LOD node model.
[0180] Read the metadata information of the original oblique photography data (denoted as original data in the present application), restore the oblique photography data, and reconstruct the LOD node model of the plurality of original slices in the original oblique photography data using the quadtree structure.
[0181] 1.2) Supplementary model node
[0182] Recursively check whether there is a missing child node of the quadtree structure in the model data node in the level to be merged from the top layer of the LOD node model, and if there is, copy the data from the parent node to the child node for supplementation.
[0183] 1.3) Merging root node
[0184] Merge the child layer nodes in the LOD node model using the merging function to obtain the merged root node in the target model, wherein the first vertex contained in the merged root node comprises the vertex contained in each child layer node before merging.
[0185] 1.4) Recalculating the vertex position of the vertex
[0186] Calculate the center point of the target model according to the bounding box of the vertex of the target model, subtract the center point of the three-dimensional scene from the center point of the target model to calculate the offset matrix of the target model, and recalculate the vertex position of the vertex contained in each node of the target model based on the offset matrix.
[0187] a) Calculate the bounding box of the target model according to the vertex coordinates of the target model using the bounding box calculation function.
[0188] b) Calculate the center point of the target model according to the bounding box.
[0189] c) According to the model scene origin, the center point of the target model, the offset function is used to recalculate the coordinate position value of the vertex in the LOD node model relative to the center point of the bounding box, that is, to update the vertex position contained in each node in the LOD node model.
[0190] 2) Vertex thinning module
[0191] 2.1) Read vertex data.
[0192] Read vertex information for vertices in the merged slice, wherein the vertex information includes vertex position, vertex index data, and texture coordinates indicating pixel points used for rendering in a rendered image.
[0193] 2.2) Vertex thinning.
[0194] Based on the voxel grid, average, or surface distance vertex convergence method, the Open3D vertex clustering algorithm is used to simplify and thin based on vertex information, and a geometric grid data model is generated.
[0195] Through the vertex thinning function Simplify, each target vertex in the merged slice after thinning is obtained.
[0196] 2.3) Reconstruct UV coordinate data, and generate UV coordinate data consistent with each target vertex using the UV reconstruction method based on the thinned target vertices to update the texture coordinates.
[0197] 3) Texture compression module
[0198] 3.1) Reduce texture resolution.
[0199] Read the texture data to obtain the texture image, and use the pixel area reduction-based method to reduce the texture picture to a suitable resolution; the original size pixel texture image is reduced to r times (r <1) of the reduced texture image according to the set scaling factor, and a cubic spline interpolation function is used to recalculate the pixel values of each pixel in the texture image.
[0200] 3.2) Image compression.
[0201] According to the compression mode and the picture quality factor, the WebP compression algorithm is used to compress the texture image.
[0202] 4) Render data merging module
[0203] 4.1) Create a single primitive data block.
[0204] Initialize the vertex coordinates, vertex indices, texture coordinates, and normal vector structure of the primitive data block.
[0205] 4.2) Vertex data block merging.
[0206] Traverse the vertex information of the target vertex, and merge the vertex coordinates, vertex index, texture UV coordinates, and normal vector in the vertex information into the newly created single primitive data block.
[0207] 4.3) Texture image merging.
[0208] Traverse the texture picture and merge the texture picture into a single picture data block.
[0209] 4.4) Reconstructing UV coordinate data, using the UV coordinate reconstruction method to generate UV coordinate data consistent with each target vertex from the single picture data block, and appending the data to the newly created single primitive data block.
[0210] 5) Numerical encoding module
[0211] 5.1) Read the numerical data of the vertex information, i.e., read the numerical data of the vertex information in the single primitive data block, wherein the vertex information includes vertex coordinates, texture coordinates, and normal vectors.
[0212] 5.2) Numerical encoding, encode the vertex information of the floating-point data type into the vertex information of the integer type using the Draco numerical encoding method according to the quantization bit number and compression level.
[0213] In summary, the data processing method of oblique photography of the present application can embody at least one of the following advantages:
[0214] 1. By using the quadtree node merging method on the original oblique photography data, the number of slice files can be reduced, thereby reducing the number of slice requests during data loading.
[0215] 2. By recalculating the vertex position of the vertex, the problem of visual edge jaggedness of the model during Web front-end rendering caused by large vertex coordinate values and precision loss can be solved.
[0216] 3. Through the optimization process of root node merging, vertex thinning, texture compression, rendering data merging, and numerical encoding, the performance optimization of oblique photography data can be achieved.
[0217] Through the inventor's research, it is found that through the processing of node merging, vertex thinning, model compression, and texture compression, the processed data becomes about 1 / 3 to 1 / 6 of the original data size, solving the problems of slow three-dimensional data loading, browsing lag, and easy crash when the data volume is large. Through testing under a local area network environment, the time for single-screen data request loading and rendering is reduced from more than 10 seconds to less than 3 seconds, greatly improving the three-dimensional oblique photography data loading, browsing, and interaction experience.
[0218] In summary, the data processing method for oblique photography provided in the application realizes step-by-step optimization processing of model data from coarse granularity to fine granularity, effectively reduces the memory occupation of oblique photography data by reducing the number of slices and the data volume of oblique photography data, and improves the loading performance and efficiency.
[0219] Corresponding to the data processing method for oblique photography provided in the above several embodiments, an embodiment of the application further provides a data processing apparatus for oblique photography. Since the data processing apparatus for oblique photography provided in the embodiment of the application corresponds to the data processing method for oblique photography provided in the above several embodiments, the implementation of the data processing method for oblique photography is also applicable to the data processing apparatus for oblique photography provided in the embodiment, which will not be described in detail in the embodiment.
[0220] Figure 5 FIG. 7 is a structural schematic diagram of the data processing apparatus for oblique photography provided in the seventh embodiment of the application.
[0221] As shown in FIG. 7, the data processing apparatus 500 for oblique photography can include an acquisition module 501, a first merging module 502, a thinning module 503, a first processing module 504, and a first generation module 505. Figure 5
[0222] The acquisition module 501 is configured to acquire original data for oblique photography, wherein the original data includes a plurality of original slices and texture images for rendering each original slice, and each original slice includes a plurality of vertices for sub-dividing the original slice.
[0223] The first merging module 502 is configured to perform root node merging on the plurality of original slices to obtain merged slices.
[0224] The thinning module 503 is configured to perform vertex thinning on the vertices in the merged slices to obtain target vertices in the merged slices after thinning.
[0225] The first processing module 504 is configured to perform image processing on the texture images for rendering the merged slices to obtain target textures corresponding to each merged slice.
[0226] The first generation module 505 is configured to generate target data for oblique photography based on the target vertices of the merged slices and the target textures for rendering the merged slices, and perform three-dimensional oblique photography image display on a client based on the target data.
[0227] In a possible implementation of the embodiment of the present application, the first merging module 502 is configured to read the original data to reconstruct the LOD node model of each original slice, wherein the LOD node model comprises a plurality of tree-shaped nodes at different levels, and each node at a level comprises vertices used for rendering an image at a corresponding resolution; and perform root node merging on child nodes at different levels in the LOD node model by using a merging function to obtain a merged root node in a target model, wherein the first vertices included in the merged root node comprise the vertices included in each child node before merging; determine a center point of the target model according to an outer bounding box of the target model obtained based on the vertices included in the merged root node; update the vertex positions of the vertices included in each node in the target model according to the center point of the target model; and determine the merged slice based on the vertex positions of the vertices included in the target model.
[0228] In a possible implementation of the embodiment of the present application, the LOD node model adopts a quadtree structure, and the data processing apparatus 500 for oblique photography can further comprise:
[0229] The checking module is configured to check, recursively from a top layer, whether a node at a level to be merged is missing a child node of the quadtree structure.
[0230] The copying module is configured to copy the parent node as the missing child node in the case where the missing node exists.
[0231] In a possible implementation of the embodiment of the present application, the thinning module 503 is configured to: obtain vertex information of the vertices in the merged slice, wherein the vertex information comprises vertex positions and vertex index data; and perform vertex thinning on the vertices in the merged slice based on the vertex information by using a vertex clustering algorithm to obtain each target vertex in the merged slice after thinning.
[0232] In a possible implementation of the embodiment of the present application, the vertex information further comprises texture coordinates used for indicating pixel points used for rendering in a rendered image; and the method further comprises:
[0233] The first updating module is configured to update the texture coordinates according to the vertex positions of the target vertices after thinning.
[0234] In a possible implementation of the embodiment of the present application, the first processing module 504 is configured to: reduce the resolution of the texture image of the rendered merged slice, and / or perform image compression on the texture image of the rendered merged slice to obtain a target texture corresponding to each merged slice.
[0235] In a possible implementation of the embodiment of the present application, the first processing module 504 is configured to: reduce the image size of the texture image of the rendering merged slice according to a set scaling factor, where the scaling factor is less than 1; and determine the pixel value of each pixel in the target texture by using a cubic spline interpolation function based on the reduced image size.
[0236] In a possible implementation of the embodiment of the present application, the first processing module 504 is configured to: compress the texture image by using a set compression algorithm according to a set compression mode and a set picture quality factor.
[0237] In a possible implementation of the embodiment of the present application, the target data includes rendering data; the data processing apparatus 500 for oblique photography can further include:
[0238] The second generating module is configured to generate a single primitive data block based on the vertex information of the at least two target vertices, where the vertex information includes one or more combinations of a vertex coordinate, a vertex index, a texture coordinate, and a normal vector structure.
[0239] The second merging module is configured to perform texture image merging on at least two target textures required for rendering of the at least two target vertices, to obtain a single picture data block.
[0240] The second updating module is configured to update the texture coordinates in the single primitive data block based on the image size of the single picture data block and the image sizes of the at least two target textures before the texture image merging.
[0241] The third generating module is configured to generate rendering data for instructing the GPU of the client to perform rendering, according to the single primitive data block and the single picture data block.
[0242] In a possible implementation of the embodiment of the present application, the data processing apparatus 500 for oblique photography can further include:
[0243] The second processing module is configured to perform quantization processing on the vertex information of the floating-point data type in the single primitive data block, to convert the vertex information into vertex information of the integer data type.
[0244] The oblique photogrammetry data processing apparatus of this application embodiment acquires raw oblique photogrammetry data, wherein the raw data includes multiple raw slices and texture images for rendering each raw slice, and each raw slice includes multiple vertices for partitioning the raw slice; merges the root nodes of the multiple raw slices to obtain merged slices; performs vertex thinning on the vertices in the merged slice to obtain each target vertex in the merged slice; and performs image processing on the texture images of the rendered merged slice to obtain the target textures corresponding to each merged slice; based on the target vertices of the merged slice and the target textures of the rendered merged slice, generates target data for oblique photogrammetry, and displays 3D oblique photogrammetry images on the client based on the target data. Therefore, by reducing the number of slices and the amount of oblique photogrammetry data, the memory usage of oblique photogrammetry data is effectively reduced, improving loading performance and efficiency.
[0245] To achieve the above embodiments, this application also proposes an electronic device. Figure 6 This is a schematic diagram of the structure of the electronic device provided in Embodiment 8 of this application. The electronic device includes:
[0246] The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.
[0247] When the processor 602 executes the program, it implements the oblique photography data processing method provided in the above embodiments.
[0248] Furthermore, electronic devices also include:
[0249] Communication interface 603 is used for communication between memory 601 and processor 602.
[0250] The memory 601 is used to store computer programs that can run on the processor 602.
[0251] The memory 601 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0252] The processor 602 is used to implement the oblique photography data processing method described in the above embodiments when executing the program.
[0253] If the memory 601, the processor 602 and the communication interface 603 are implemented independently, the communication interface 603, the memory 601 and the processor 602 can be connected with each other through a bus and complete communication between each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For convenience of representation, Figure 6 Only one thick line is used to represent the bus in the figure, but it does not mean that there is only one bus or only one type of bus.
[0254] Optionally, in a specific implementation, if the memory 601, the processor 602 and the communication interface 603 are integrated on a chip, the memory 601, the processor 602 and the communication interface 603 can complete communication between each other through an internal interface.
[0255] The processor 602 can be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0256] In order to implement the above-mentioned embodiments, the embodiments of the present application further provide a non-transitory computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the data processing method for oblique photography provided in the above-mentioned embodiments.
[0257] In order to implement the above-mentioned embodiments, the embodiments of the present application further provide a computer program product, which, when executed by a processor, implements the data processing method for oblique photography provided in the above-mentioned embodiments.
[0258] In the description of the application, reference to "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that a particular feature, structure, material, or characteristic being described is included in at least one embodiment or example of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment or example. Furthermore, the described specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples. Moreover, the usage of the terms "first", "second" or "third" does not limit the quantity or order of the specific features, structures, materials or characteristics, but rather the term "first", "second" or "third" can be used to distinguish different features, structures, materials or characteristics, which can be combined in any suitable manner. Furthermore, the singular forms "a", "an" and "the" include plural references unless the context clearly dictates otherwise.
[0259] Furthermore, the terms "first", "second", or the like, merely denote different instances of a similar feature, structure, material or characteristic, without necessarily implying any relative importance or any particular order. Thus, a feature defined with "first" or "second" can implicitly or explicitly include at least one of the features. The meaning of "a", "an" and "the" includes plural references unless the context clearly dictates otherwise.
[0260] Any process or method descriptions or blocks in flow charts or otherwise described herein represent embodiments which can be managed as one or more modules, segments, or portions of code which include one or more steps for implementing specific logic functions or steps, and the terms in the description are used for causing or carrying out or upgrading of an action between other hardware under their control. The description of processes and methods of operations should be considered as merely illustrative of the principles of the application, and not in limitation of its scope.
[0261] The logic and / or steps represented in the flowcharts and / or described herein, for example, can be considered as a sequence of instructions to implement logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device, such as a computer-based system, processor- based system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a computer- readable storage medium or a computer-readable signal medium. The computer- readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include the following: an electrical connection having one or more wires (electrical connections), a portable computer diskette (a magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium can even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via optical scanning of the paper or other medium, then compiled, interpreted, or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
[0262] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. As such, in some embodiments, specifically configured hardware can be used to implement at least some of the functionality described herein. For example, if implemented in hardware, the hardware can include any or a combination of the following: a discrete logic circuit having logic gates for implementing logic functions upon data signals, an application specific integrated circuit having appropriate combinational logic gates, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0263] Those of skill in the art would understand that information and signals can be represented using any of a variety of technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that can be referenced throughout the above description can be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
[0264] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing module, or each of the units can be physically present separately, or two or more units can be integrated in one module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
[0265] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.
Claims
1. A data processing method for tilt photography, characterized by, The method comprises the following steps: Obtaining original data of the oblique photography, wherein the original data comprises a plurality of original slices and texture images for rendering each of the original slices, and each of the original slices comprises a plurality of vertices for sub-dividing the original slice; Merging the plurality of original slices to obtain a merged slice; Performing vertex thinning on the vertices in the merged slice to obtain each target vertex in the merged slice after thinning, and performing image processing on the texture image for rendering the merged slice to obtain a target texture corresponding to each of the merged slices; Generating target data of the oblique photography based on the target vertices of the merged slice and the target texture for rendering the merged slice, so as to display a three-dimensional oblique photography image on a client based on the target data; The merging of the plurality of original slices to obtain a merged slice comprises: Reading the original data to reconstruct an LOD node model of each of the original slices, wherein the LOD node model comprises a plurality of tree-shaped nodes, and each layer node comprises vertices for rendering an image of a corresponding resolution; Performing root node merging on the child layer nodes in the LOD node model by using a merging function to obtain a merged root node in a target model, wherein the first vertices included in the merged root node comprise the vertices included in each of the child layer nodes before merging; Determining a center point of the target model according to the outer bounding box of the target model obtained from the vertices included in the merged root node; Updating the vertex positions of the vertices included in each node in the target model according to the center point of the target model; Determining the merged slice based on the vertex positions of the vertices included in the target model; The updating of the vertex positions of the vertices included in each node in the target model according to the center point of the target model comprises: Recomputing the vertex positions of the vertices included in each node in the target model relative to the center point of the target model by using an offset function according to the three-dimensional model scene origin and the center point of the target model, and the recomputation is represented as: wherein Origin represents a coordinate reference origin of a model scene, P i is the i-th vertex coordinate with the Origin as the origin, C m is a center point of a target model, is a vertex position of each node in the target model relative to the center point of the target model, i ∈ [1, n], and i is an integer, and n is the number of vertices. The target data comprises rendering data; and the method further comprises: Generating a single primitive data block based on vertex information of at least two target vertices, wherein the vertex information comprises one or more combinations of vertex coordinates, vertex indexes, texture coordinates, and normal vector structures; Performing texture image merging on at least two target textures required for rendering the at least two target vertices to obtain a single picture data block; Updating the texture coordinates in the single primitive data block based on the image size of the single picture data block and the image sizes of the at least two target textures before texture image merging; Generating rendering data for instructing a GPU of the client to perform rendering according to the single primitive data block and the single picture data block; The method further comprises: Quantizing the vertex information of the floating-point data type in the single primitive data block to convert the vertex information into vertex information of an integer data type, comprising: Numerical data of vertex coordinates, texture coordinates, normal vectors of a single primitive data block, based on quantization bits, compression levels, floating-point data is encoded into integer data by using Draco numerical encoding method, and the encoding process includes: Before encoding the floating-point data, k floating-point values v1, v2,..., vk are recorded. k Recorded as: The numerical value of the vertex coordinates of the single primitive data block is encoded by using the encoding function E() to encode the floating-point data into integers: Wherein, level is compression level, quantization is quantization bit number, is the vertex coordinate of the encoded single primitive data block.
2. The method of claim 1, wherein, The LOD node model adopts a quadtree structure, and the method further includes: Recursively checking whether the missing child nodes of the quadtree structure exist in the top layer of the LOD node model from the top layer to the level of the node to be merged; In the case of missing, the parent node is copied as the missing child node.
3. The method of claim 1, wherein, The method further includes: Obtaining vertex information of the vertices in the merged slice, wherein the vertex information includes vertex position and vertex index data; Using a vertex clustering algorithm, the vertices in the merged slice are thinned based on the vertex information to obtain the target vertices in the merged slice after thinning.
4. The method of claim 3, wherein, The vertex information further includes texture coordinates used to indicate pixel points in a rendered image; the method further includes: Updating the texture coordinates according to the vertex positions of the thinned target vertices.
5. The method of claim 1, wherein, The method further includes: Reducing the resolution of the texture image rendered by the merged slice, and / or compressing the texture image rendered by the merged slice to obtain the target texture corresponding to each merged slice.
6. The method of claim 5, wherein, The method further includes: Reducing the resolution of the texture image rendered by the merged slice, and / or compressing the texture image rendered by the merged slice to obtain the target texture corresponding to each merged slice. The method further includes:
7. The method of claim 5, wherein, Reducing the resolution of the texture image rendered by the merged slice, and / or compressing the texture image rendered by the merged slice to obtain the target texture corresponding to each merged slice. The method further includes: According to the set compression mode and the set picture quality factor, the set compression algorithm is used to compress the texture image. The method further includes: According to the set compression mode and the set picture quality factor, the set compression algorithm is used to compress the texture image.
Citation Information
Patent Citations
Method and system for converting large-range live-action three-dimensional projection coordinate into spherical coordinate system
CN112085660A
Display optimization method and device for massive skew data at Web side
CN114170394A