Optimized Terrain Rendering Method, System, Device and Medium Based on Energy Operator

By calculating the energy operator of the triangle grid unit and performing corresponding processing, the transition problem between simplification and segmentation in three-dimensional terrain data processing is solved, and a better terrain rendering effect is achieved.

CN117392303BActive Publication Date: 2025-06-10GUANGDONG PROVINCIAL MARINE DEV PLANNING RES CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311699703.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-06-10
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

In the prior art, when processing large-scale three-dimensional terrain data, it is difficult to achieve refined modeling of terrain data, especially the lack of smooth transition between simplification and segmentation.

Method used

By calculating the energy operator of the triangle grid unit and marking and processing according to the preset threshold, grid units below the threshold are simplified in triangle folding, and grid units above the threshold are subdivided, thereby reconstructing the triangle grid model and rendering the terrain.

Benefits of technology

It realizes the simplification of terrain modeling and the unity of segmentation, avoids unnatural edges and deformations during the segmentation process, and achieves a better rendering effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117392303B_ABST
    Figure CN117392303B_ABST
Patent Text Reader

Abstract

The present invention provides an optimized terrain rendering method, system, device and medium based on an energy operator. The method includes: obtaining terrain data, constructing a triangular grid model composed of a plurality of triangular grid units according to the terrain data, and calculating the energy operator of each triangular grid unit based on the triangular grid model; marking the triangular grid units with an energy operator less than or equal to a preset threshold as first target units, and performing triangular folding simplification processing on the first target units to obtain first reconstructed units; marking the triangular grid units with an energy operator greater than the preset threshold as second target units, and performing subdivision processing on the second target units to obtain second reconstructed units; reconstructing the triangular grid model according to the first reconstructed units and the second reconstructed units to obtain a reconstructed triangular grid model, and performing terrain rendering on the reconstructed triangular grid model to achieve the unity of model simplification and subdivision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional terrain rendering, and particularly to an optimized terrain rendering method, system, device and medium based on an energy operator. Background Art

[0002] With the continuous iterative update of the technology of terrain data acquisition devices, for the refined modeling requirements of terrain, the amount of three-dimensional terrain data also shows an increasing trend. However, the current program has limited capabilities for reading and storing large-scale terrain data. There is still a prominent contradiction between high-precision three-dimensional terrain modeling and limited terrain data processing capabilities.

[0003] For three-dimensional terrain modeling algorithms for massive data, the current research hotspots only focus on the simplification of terrain data, or stay at generating multi-level of detail models by only one operation of simplification or subdivision. However, the grid data constituting the three-dimensional terrain should have different levels of refinement in different regions. The grid density is smaller in simple terrain areas and larger in complex terrain areas. Currently, only terrain simplification or subdivision is carried out, separating the two. Even if this problem is considered, there is also the problem of whether smooth transition can be achieved between terrain modeling simplification and subdivision. Summary of the Invention

[0004] An embodiment of the present invention provides an optimized terrain rendering method based on an energy operator to solve the problems existing in the related technology. The technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides an optimized terrain rendering method based on an energy operator, including:

[0006] Obtain terrain data, construct a triangular grid model composed of a plurality of triangular grid units according to the terrain data, and calculate the energy operator of each triangular grid unit based on the triangular grid model;

[0007] Mark the triangular grid units with an energy operator less than or equal to a preset threshold as first target units, perform triangular folding simplification processing on the first target units to obtain first reconstructed units; mark the triangular grid units with an energy operator greater than the preset threshold as second target units, and perform subdivision processing on the second target units to obtain second reconstructed units;

[0008] Reconstruct the triangular grid model according to the first reconstructed units and the second reconstructed units to obtain a reconstructed triangular grid model, and perform terrain rendering on the reconstructed triangular grid model.

[0009] In an implementation manner, the method for determining the energy operator of a triangular grid unit is:

[0010] Calculate according to the vertices of the triangular grid cells and the connecting edges between the connected vertices to obtain the vertex energy operator of each vertex in the triangular grid cells;

[0011] Calculate the sum of the vertex energy operators of all vertices in the same triangular grid cell to obtain the energy operator of the triangular grid cell.

[0012] In one implementation, the calculation method of the vertex energy operator is as follows:

[0013]

[0014] where P v represents the in-degree of the vertex v; P j represents the in-degree of the vertex v j ; represents the average length of all in-edges of the vertex v j ; v-v j represents the difference between the in-degrees of the vertex and the vertex.

[0015] In one implementation, the determination method of the preset threshold is as follows:

[0016] Calculate according to the energy operator of each triangular grid cell to obtain the sum of the energy operators of all triangular grid cells, and divide the sum of the energy operators of all triangular grid cells by the total number of cells of the triangular grid cells to obtain the average energy operator;

[0017] Calculate the product of the average energy operator multiplied by the preset coefficient to obtain the preset threshold.

[0018] In one implementation, the method of triangular folding simplification is as follows:

[0019] Calculate according to the plane vector where the triangular grid cell is located to obtain the error matrix of each vertex;

[0020] Calculate according to the error matrix of the vertices corresponding to each edge to obtain the folding cost of each edge collapse and the position of the new vertex after collapse;

[0021] Sort the folding costs of each edge collapse by size to obtain the sorted folding costs;

[0022] Determine the edge to be collapsed according to the sorted folding costs, and collapse the edge to be collapsed according to the position of the new vertex after collapse to obtain the first reconstruction unit.

[0023] In one implementation, the method of subdivision processing is as follows:

[0024] The edge to be inserted with a new vertex in the second target cell is the target edge;

[0025] Update the positions of the old vertices in the second target unit to obtain the updated coordinates of the old vertices;

[0026] Traverse the target edges in the second target unit, select the corresponding subdivision rule according to the type of the target edge, and determine the coordinates of the new vertices to be inserted;

[0027] Perform network reconstruction on the second target unit according to the coordinates of the new vertices to be inserted and the updated coordinates of the old vertices to form a second reconstructed unit.

[0028] In one implementation, the subdivision rules include:

[0029] When the type of the target edge is an internal edge, calculate according to the vertex distance weighting method of the target edge to obtain the coordinates of the new vertices to be inserted;

[0030] When the type of the target edge is a boundary edge, take the average value of the two endpoints on the boundary edge as the position of the newly inserted vertex.

[0031] In a second aspect, an embodiment of the present invention provides an optimized terrain rendering system based on an energy operator, which executes the optimized terrain rendering method based on an energy operator as described above.

[0032] In a third aspect, an embodiment of the present invention provides an electronic device, which includes: a memory and a processor. Among them, the memory and the processor communicate with each other through an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory. When the processor executes the instructions stored in the memory, the processor executes the methods in any one of the above aspects.

[0033] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program runs on a computer, the methods in any one of the above aspects are executed.

[0034] The advantages or beneficial effects in the above technical solutions at least include:

[0035] The present invention relates to the technical field of three-dimensional terrain rendering. Specifically, by calculating the energy operator of the terrain grid unit, setting a threshold, the grid units below the threshold are processed by the triangle folding simplification method, and the topological relationship of the folding area is reconstructed; for the grids with an energy operator higher than the threshold, a distance weighting method is used for subdivision, so that the subdivision result is more delicate and smooth, avoiding the problems of unnatural edges and deformations during the subdivision process, and realizing the unity of model simplification and subdivision.

[0036] The above summary is for the purpose of the specification only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will be readily apparent by reference to the drawings and the following detailed description. Description of the Drawings

[0037] In the drawings, unless otherwise specified, the same reference numerals throughout the several views denote the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in accordance with the present invention and should not be regarded as limiting the scope of the present invention.

[0038] Figure 1 It is a schematic flow diagram of the optimized terrain rendering method based on the energy operator of the present invention;

[0039] Figure 2 It is an example diagram of a triangular grid used in the energy operator calculation step of the present invention;

[0040] Figure 3 It is an example diagram of a triangular grid used in the QEM simplification step of the present invention;

[0041] Figure 4 It is an example diagram of a triangular grid used in the present invention to define interior points, boundary points, interior edges, and boundary edges;

[0042] Figure 5 It is an example diagram of a triangular grid for inserting new vertices in the Loop mesh subdivision step of the present invention;

[0043] Figure 6 It is an example diagram of the boundary points to be updated and their surrounding boundary points of the present invention;

[0044] Figure 7 It is an example diagram of a triangular grid for inserting new vertices of the present invention;

[0045] Figure 8 It is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Embodiments

[0046] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various different ways without departing from the spirit or scope of the present invention. Therefore, the drawings and the description are to be regarded as illustrative in nature and not restrictive.

[0047] Embodiment 1

[0048] This embodiment provides an optimized terrain rendering method based on the energy operator. Through this method, refined terrain modeling can be achieved, and the simplification and subdivision of terrain modeling can be better unified to achieve a better rendering effect. Among them, as Figure 1 shown, the optimized terrain rendering method based on the energy operator specifically includes the following steps:

[0049] Step S1: Obtain terrain data, construct a triangular grid model composed of several triangular grid units based on the terrain data, and calculate the energy operator of each triangular grid unit based on the triangular grid model;

[0050] Step S2: Traverse all triangular grid units, compare the energy operator of each triangular grid unit with a preset threshold, and mark the triangular grid units with an energy operator less than or equal to the preset threshold as the first target units. Perform triangular folding simplification on the first target units to obtain the first reconstructed units; Mark the triangular grid units with an energy operator greater than the preset threshold as the second target units, and perform subdivision on the second target units to obtain the second reconstructed units;

[0051] Step S3: Obtain the reconstructed triangular grid model according to the first reconstructed units and the second reconstructed units and perform terrain rendering.

[0052] Among them, the terrain data mainly includes the ground elevation information made according to the remote sensing image. The ground elevation information is also called DEM. Use DEM to extract contour lines and import them into the 3dMax modeling software. Then, make a triangular grid model according to the contour lines and export it as a model file in obj format.

[0053] The energy operator E f (v) is an evaluation parameter of the grid density and importance, which is determined by the number of sides and the side lengths of the connected sides between the grid points and the adjacent grid points.

[0054] The calculation method of the energy operator of the triangular grid unit is as follows:

[0055] According to the vertices of the triangular grid unit and the connected sides between the connected vertices, calculate the vertex energy operator of each vertex in the triangular grid unit;

[0056] Calculate the sum of the vertex energy operators of all vertices in the same triangular grid unit to obtain the energy operator of the triangular grid unit.

[0057] As Figure 2 shown, taking the triangular grid in Figure 2 as an example, in the figure, the vertex v is connected to j vertices, and there are j edges starting from the vertex v. That is, the in-degree of the vertex v is j, and the edges connected to the vertex v are called the in-edges of the vertex v. Similarly, for the vertex v j, with an in-degree of n, having n incoming edges, and the length of the incoming edges being L n .

[0058] The vertex energy operator E f (v) of vertex v is calculated as follows:

[0059]

[0060] where P v represents the in-degree of vertex v; P j represents the in-degree of vertex v j . represents the average length of all incoming edges of vertex v j , that is ; v - v j represents the difference in in-degree between vertex v and vertex v j .

[0061] It should be noted that the vertex symbols involved in the above formula are only related to the vertex naming in Figure 2 , and the above formula and Figure 2 are only used as examples to illustrate the calculation method of the vertex energy operator of a vertex in a triangular lattice network.

[0062] After calculating the vertex energy operators of all vertices in a triangular lattice network cell, sum up the vertex energy operators of all vertices belonging to the same triangular lattice network cell to obtain the energy operator of this triangular lattice network cell. For example, calculate the vertex energy operators of vertices v, v j , v1, and sum them up as the energy operator of the triangular lattice network cell .

[0063] Subsequently, compare the energy operator of the triangular lattice network cell with a preset threshold, and perform corresponding grid processing on the triangular lattice network cell according to the comparison result.

[0064] Among them, the preset threshold is set according to the average energy operator, and the calculation method of the preset threshold is as follows:

[0065] Calculate the sum of the energy operators of all triangular lattice network cells based on the energy operator of each triangular lattice network cell, and then divide by the total number of cells of the triangular lattice network cells to obtain the average energy operator;

[0066] Calculate the product of the average energy operator multiplied by a preset coefficient to obtain the preset threshold; the preset coefficient can be set according to the actual situation, and the specific value of the coefficient is not limited here.

[0067] Traverse all triangular grid cells, compare the energy operator of each triangular grid cell with a preset threshold. If it is found through comparison that the energy operator of a certain triangular grid cell is less than or equal to the preset threshold, then mark the triangular grid cell with an energy operator less than or equal to the preset threshold as the first target cell, and perform triangular folding simplification processing on the first target cell to obtain the first reconstructed cell.

[0068] If it is found through comparison that the energy operator of a certain triangular grid cell is greater than the preset threshold, then mark the triangular grid cell with an energy operator greater than the preset threshold as the second target cell, and perform subdivision processing on the second target cell to obtain the second reconstructed cell.

[0069] For the first target cell, adopt the QEM triangular folding simplification method, that is, achieve the purpose of edge collapse for the first target cell through the merging between point pairs.

[0070] As Figure 3 shown, Figure 3 collapse a certain point pair (v1, v2) to point v. Pre-establish a vertex set E, and the vertex set E contains the vertices on the first target cell that need to be simplified, and the vertex set E does not contain the vertices that share an edge with the second target cell that needs to be subdivided.

[0071] When reducing vertices, the principle adopted is to select the point pair that can minimize the squared error generated after reduction. Select the contraction point pair to be executed in the above vertex set E, introduce the concept of 'contraction cost' to describe the error on each vertex in the vertex set E, and associate each vertex with a symmetric 4*4 matrix Q, and define the error at the vertex as:

[0072]

[0073]

[0074] Among them, represents the plane defined by the variance ax + by + cy + d = 0. Each vertex is the solution of the intersection of a group of planes and has a corresponding Q matrix.

[0075] And the method of triangular folding simplification processing is:

[0076] According to the plane vector where the triangular grid cell is located, that is, the p vector of each face, calculate the error matrix Q of each vertex.

[0077] Subsequently, traverse each edge of the first target cell, and according to the error matrices Q1 and Q2 of the two vertices corresponding to each edge, calculate the folding cost Cost of the collapse and the position v of the new vertex after the collapse n ;

[0078]

[0079] If (Q1 + Q2) is not invertible, take the midpoint of the edge as the position of the new vertex after collapse.

[0080] Finally, put the folding cost Cost of each edge collapse into the queue, sort it by size, and then take out the Cost value from the queue in turn according to the size of the folding cost Cost. For the edge corresponding to the folding cost Cost, collapse it according to the position v of the new vertex after its collapse n to obtain the corresponding first reconstruction unit.

[0081] After all the first target units have completed the triangle folding simplification process, the topological reconstruction of the triangular grid model is completed.

[0082] It should be noted that the vertex symbols involved in the above formula are only related to Figure 3 the vertex naming in, and are only used as examples to illustrate the triangle folding simplification method of the triangular grid.

[0083] For the second target unit, the Loop mesh subdivision method is used for subdivision processing. After the original Loop subdivision algorithm subdivides a single grid, the transition to the surrounding grids is relatively abrupt, which will cause the problem of uneven model grids. The improved Loop subdivision algorithm incorporates the grids adjacent to the subdivided grid into the topological reconstruction range.

[0084] To better topological reconstruction, the following concepts are introduced: 'interior point', 'boundary point', 'interior edge', 'boundary edge', as Figure 4 shown, Figure 4 in which vertex v is an interior point, vertices p and t are boundary points; edges vp and pp are interior edges, and edge pt is a boundary edge. It should be noted that the vertex symbols involved in the process of defining interior points, boundary points, interior edges, and boundary edges are only related to the Figure 4 vertex naming in the appendix, and are only used as examples to illustrate the definition methods of interior points, boundary points, interior edges, and boundary edges.

[0085] Refer to Figure 5 as shown, the method of subdivision processing is as follows:

[0086] (1) Mark the edges that need to insert new vertices in the second target unit as target edges. For example, Figure 5 as shown in the second target unit , mark the edges ab, ac, and bc that need to insert new vertices.

[0087] (2) To make the subdivided grid smoother, it is necessary to update the positions of the old vertices in the second target unit to obtain the updated coordinates of the old vertices;

[0088] For internal points, the update rule is as follows:

[0089]

[0090] where n represents the in-degree of the vertex, v represents the updated coordinates of the vertex, v 0 is the original coordinate, and v i represents the coordinates of the vertices connected to the vertex.

[0091] For the update rule of boundary points: , to update the position of the boundary point, only consider the boundary points connected to itself. Among them, the relationship between v1, v2 and v0 can be combined with Figure 6 as shown. v0 is the boundary point to be updated, and v1, v2 are the surrounding boundary points.

[0092] It should be noted that the signs of v1, v2 and v0 in the update rule of boundary points are only related to the Figure 6 vertex naming attached, and have nothing to do with the symbols repeated in other figures and formulas.

[0093] (3) Traverse the target edges in the second target cell, and calculate the coordinates of the new vertices to be inserted according to the subdivision rules of different types of target edges.

[0094] For internal edges, an improved subdivision rule is adopted, and the contribution of the vertex coordinates to the interpolation point is weighted according to the distance between vertices. Compared with the traditional subdivision algorithm, it can achieve a better smoothing effect. Combining Figure 7 as shown, Figure 7 the calculation rule of the coordinates of the newly inserted vertex v in

[0095]

[0096] In the above formula, L i represents the distance between adjacent vertices, v i is the vertex coordinate, and p i is the vertex weight.

[0097] It should be noted that the vertex symbols involved in the above formula are only related to the Figure 7 vertex naming in, and are only used as examples to illustrate the subdivision rule of internal edges in the triangular grid, and have nothing to do with the symbols repeated in other figures and other formulas.

[0098] For inserting a new vertex on the boundary edge, take the average value of the two endpoints on the boundary edge as the position of the newly inserted vertex, and its formula is: v = 1 / 2(v0 + v1), where v0 and v1 are the two endpoints on the boundary edge respectively.

[0099] (4) Create the topological relationship between the new vertex coordinates and the old vertex coordinates and connect them into a network to form the second reconstruction unit. That is, traverse the triangular cell network to be subdivided, and obtain the newly inserted vertices corresponding to the triangular sides. There are a total of three vertices, and connect these three vertices into a triangle, that is, complete the topological reconstruction.

[0100] After traversing all the triangular grid cells, a triangular grid model including the first reconstruction unit and the second reconstruction unit is formed, and the triangular grid model is rendered to output the reconstructed three-dimensional model.

[0101] In this embodiment, grid resolution modeling suitable for different regions of the terrain is realized according to the complexity of the terrain, and smooth transition of different terrain grid resolutions is achieved. With the same or less data volume, more refined three-dimensional terrain modeling can be realized.

[0102] Embodiment Two

[0103] This embodiment provides an optimized terrain rendering system based on an energy operator, which executes the optimized terrain rendering method based on the energy operator described in Embodiment One. Specifically, the system includes the following modules:

[0104] A model construction module for obtaining terrain data and constructing a triangular grid model composed of a plurality of triangular grid cells according to the terrain data;

[0105] An energy operator calculation module for calculating the energy operator of each triangular grid cell based on the triangular grid model.

[0106] An optimization processing module for traversing all the triangular grid cells, comparing the energy operator of each triangular grid cell with a preset threshold, and marking the triangular grid cells whose energy operator is less than or equal to the preset threshold as the first target cells, and performing triangular folding simplification processing on the first target cells to obtain the first reconstruction unit; marking the triangular grid cells whose energy operator is greater than the preset threshold as the second target cells, and performing subdivision processing on the second target cells to obtain the second reconstruction unit;

[0107] A rendering module for obtaining the reconstructed triangular grid model according to the first reconstruction unit and the second reconstruction unit and performing terrain rendering.

[0108] The functions of the modules in the system of the embodiment of the present invention can be referred to the corresponding descriptions in the above method, and will not be elaborated here.

[0109] Embodiment Three

[0110] Figure 8 The structural block diagram of an electronic device according to an embodiment of the present invention is shown. As Figure 8As shown in the figure, the electronic device includes: a memory 100 and a processor 200. The memory 100 stores a computer program that can run on the processor 200. When the processor 200 executes the computer program, it implements the optimized terrain rendering method based on the energy operator in the above embodiments. The number of the memory 100 and the processor 200 can be one or more.

[0111] The electronic device further includes:

[0112] a communication interface 300, which is used to communicate with external devices and perform data interaction and transmission.

[0113] If the memory 100, the processor 200, and the communication interface 300 are implemented independently, the memory 100, the processor 200, and the communication interface 300 can be interconnected through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, 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 the sake of convenience of representation, Figure 8 only a thick line is used to represent it in the figure, but it does not mean that there is only one bus or one type of bus.

[0114] Optionally, in specific implementation, if the memory 100, the processor 200, and the communication interface 300 are integrated on a chip, the memory 100, the processor 200, and the communication interface 300 can complete communication with each other through an internal interface.

[0115] An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the method provided in the embodiment of the present invention.

[0116] An embodiment of the present invention further provides a chip, which includes a processor for calling and running instructions stored in a memory, so that a communication device equipped with the chip executes the method provided in the embodiment of the present invention.

[0117] An embodiment of the present invention further provides a chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided in the embodiment of the invention.

[0118] It should be understood that the above-mentioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It is worth noting that the processor can be a processor that supports the advanced RISC machines (ARM) architecture.

[0119] Further, optionally, the above-mentioned memory can include a read-only memory and a random access memory, and can also include a non-volatile random access memory. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).

[0120] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.

[0121] In the description of this specification, the descriptions with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0122] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "a plurality" is two or more, unless otherwise specifically defined.

[0123] Any process or method description shown in the flowchart or described in other ways herein can be understood to represent a module, segment, or part of code including one or more executable instructions for implementing a specific logical function or process. And the scope of the preferred embodiments of the present invention includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in a reverse order according to the involved functions, rather than in the order shown or discussed.

[0124] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing a logical function, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in connection with these instruction execution systems, apparatuses, or devices.

[0125] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the method in the above embodiments can be completed by a program instructing relevant hardware. The program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0126] In addition, each functional unit in various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above 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. The storage medium can be a read-only memory, a magnetic disk or an optical disc, etc.

[0127] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various changes or substitutions, and these should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. An optimized terrain rendering method based on an energy operator, characterized in that, it includes: Obtain terrain data, construct a triangular grid model composed of a number of triangular grid units according to the terrain data, and calculate the energy operator of each triangular grid unit based on the triangular grid model; wherein, the terrain data includes ground elevation information made from remote sensing graphics; Mark the triangular grid units whose energy operators are less than or equal to a preset threshold as first target units, and perform triangular folding simplification processing on the first target units to obtain first reconstructed units; wherein, the simplification processing includes: Pre-establish a vertex set E, the vertex set E contains the vertices on the first target unit to be simplified, and the vertex set E does not contain vertices sharing an edge with the second target unit to be subdivided; Reduce the vertices by selecting the vertex pairs to be collapsed for execution from the vertex set E. The principle adopted when reducing vertices is to select the pair that minimizes the squared error generated after reduction. Among them, the method for triangle folding simplification is as follows: According to the plane vectors where the triangular grid cells are located, that is, the p vectors of each face, calculate the error matrix Q of each vertex, traverse each edge of the first target cell, and according to the error matrices Q 1 and Q 2 , calculate the collapse folding cost Cost and the position V of the new vertex after collapse n . If (Q 1 +Q 2 ) is irreversible, then take the midpoint of the edge as the position of the new vertex after collapse, put the collapse folding cost Cost of each edge into the queue, sort it according to the size, and then take out the Cost value from the queue in turn according to the size of the collapse folding cost Cost. For the edge corresponding to the collapse folding cost Cost, collapse it according to the position V n of the new vertex after its collapse to obtain the corresponding first reconstruction unit. After all the first target cells complete the triangle folding simplification process, complete the topological reconstruction of the triangular grid model; Mark the triangular grid units whose energy operators are greater than the preset threshold as second target units, and perform subdivision processing on the second target units using the Loop grid subdivision method to obtain second reconstructed units; wherein, the method of the subdivision processing is: Take the edge to be inserted with a new vertex in the second target unit as the target edge; In the case where the type of the target edge is an internal edge, calculate according to the vertex distance weighting method between the vertices of the target edge to obtain the coordinates of the new vertex to be inserted; for an internal edge, adopt an improved subdivision rule, calculate the contribution of the vertex coordinates to the interpolation point according to the vertex distance weighting, and the calculation rule of the newly inserted vertex coordinates is: In the above formula, L i represents the distance between adjacent vertices, V i represents the vertex coordinates, and P i represents the vertex weight; Perform network reconstruction on the second target unit according to the coordinates of the newly inserted vertex to be inserted and the updated old vertex coordinates to form the second reconstructed unit; specifically, traverse the triangular cell grid to be subdivided, obtain the newly inserted vertices corresponding through the triangular edges, there are a total of three vertices, and connect these three vertices into a triangle to complete the topology reconstruction; Reconstruct the triangular grid model according to the first reconstructed unit and the second reconstructed unit to obtain a reconstructed triangular grid model, and perform terrain rendering on the reconstructed triangular grid model.

2. The optimized terrain rendering method based on an energy operator according to claim 1, characterized in that, the determination method of the energy operator of the triangular grid unit is: Calculate according to the vertices of the triangular grid unit and the connecting edges between the connected vertices to obtain the vertex energy operator of each vertex in the triangular grid unit; Calculate the sum of the vertex energy operators of all vertices in the same triangular grid unit to obtain the energy operator of the triangular grid unit.

3. The optimized terrain rendering method based on an energy operator according to claim 2, characterized in that, the calculation method of the vertex energy operator is: ; ; Among them, P V represents the in-degree of vertex V; P j represents the in-degree of vertex V j ; represents the average length of all incoming edges of vertex V j ; V-V j represents the difference between the in-degrees of vertices.

4. The optimized terrain rendering method based on an energy operator according to claim 1, characterized in that, The method for determining the preset threshold is as follows: calculate according to the energy operator of each triangular grid unit to obtain the sum of the energy operators of all the triangular grid units; divide the sum of the energy operators of all the triangular grid units by the total number of the triangular grid units to obtain the average energy operator; calculate the product of the average energy operator multiplied by a preset coefficient to obtain the preset threshold.

5. The optimized terrain rendering method based on an energy operator according to claim 1, wherein, the subdivision rule includes: when the type of the target edge is a boundary edge, use the average value of the two endpoints on the boundary edge as the position of the newly inserted vertex.

6. An optimized terrain rendering system based on an energy operator, wherein, execute the optimized terrain rendering method based on an energy operator according to any one of claims 1 to 5.

7. An electronic device, wherein, comprises: a processor and a memory, instructions are stored in the memory, and the instructions are loaded and executed by the processor to implement the optimized terrain rendering method based on an energy operator according to any one of claims 1 to 5.

8. A computer-readable storage medium, wherein, a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, it implements the optimized terrain rendering method based on an energy operator according to any one of claims 1 - 5.