[0039] In order to make the objects, technical solutions, and advantages of the present invention, the technical solutions in the present invention will be apparent from the drawings of the present invention, and it will be described in connection with the drawings of the present invention. , Not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained without creative labor are not made in the premise of creative labor.
[0040] By below Figure 1 - Figure 5 The three-dimensional terrain simulation method and apparatus for lake water based on digital elevation models are described. figure 1 One of the flow schematic of the three-dimensional terrain simulation method provided by the digital elevation model provided by the present invention, such as figure 1 As shown, the present invention provides a three-dimensional terrain simulation method based on a digital elevation model, including:
[0041] 101. A binary matrix on water body and non-water body pixel is generated according to the digital elevation model of the lake water body and the surrounding land.
[0042] First, you need to collect and cut the digital elevation model image, and the collection and pre-treatment of digital elevation model images are batch read and frequency statistics. Then, according to the statistically obtained water surface elevation value, the water body image is set to 1, and the nonaqueous image is set to 0 to generate a binary matrix.
[0043] In one embodiment, a binary matrix of water and non-aqueous pixels is generated according to the digital elevation model of the lake water body and the surrounded land, including: according to the lake water body and the digital elevation model of surrounding terrestrials, generates the water body and non-water body image Initial, the initial binary matrix is corroded with the image to expand the image to obtain a binary matrix of the lake water and land. The following will be described below.
[0044] For the process of the initial binary matrix, the initial binary matrix application, such as 3 * 3, structural elements, expansion and image expansion to the lake water, two-value matrices such as a metallic land, other.
[0045] Among them, the construction elements of 3 * 3 can be constructed as follows:
[0046]
[0047] Among them, ConvolutionAlCore is the constructor constructed.
[0048] 102. According to the lake water and land binary matrix, the lake water body boundary is obtained, according to the slope of the pixel in the preset range of the lake water boundary pixel, the polynomial fit, determine the lake water border Slope to obtain a surrounding slope matrix.
[0049] The partial portion of the water surface cell partial matrix is extracted with the obtained lake water and land binary matrix, that is, the cell value is equal to 1. The extracted lake water surface cell partial matrix application constructor is formed by image corrosion operation, and its matrix intersection before corrosion is a lake water body boundary.
[0050] The transversal of the reverse slope is a pixel above the surface of the water surface, and the present invention is fitted according to the pixel of the slope, and selection of several pixels within the preset range is fitted. Due to the continuity of the slope, it is easy to calculate the slope of the water boundary pixel. The slope of all water boundary pixels constitutes a surrounding slope matrix.
[0051] 103, according to the surrounding slope matrix and the current water surface elevation, by hypotheses the surface height of the surface, iterates the simulation elevation of the naked exposed water surface until the water avatar is calculated, and the underwater terrain matrix is simulated.
[0052] In 103, according to the surrounding slope matrix and the current water surface elevation, by hypotheses that the surface height is constantly decreasing, iterates the simulation elevation of the naked exposed water surface until the water image element is calculated, and the underwater terrain matrix is obtained.
[0053] The slope calculation of all water boundary pixels of the underwater portion is completed, and the simulation elevation of all water bodies of the underwater portion can be obtained, and finally the water terrain matrix of the simulated lake is.
[0054] 104. Using the water part of the water topographic matrix of the simulated lake to obtain the ultimate lake underwater terrain matrix.
[0055] The current method of the lack underwater terrain simulation results are the average water depth of the average water depth of the lake library and the average water depth of the lake model. For the lake library that does not measure data, the correction cannot be corrected, and the underwater simulation without correction The results are larger than that of the real value. In the present invention, the simulated lake underwater topographic matrix can be corrected by a real water portion.
[0056] According to the digital elevation model, the three-dimensional terrain is used to use the digital elevation model data to carry out three-dimensional simulation of the lake space underwater terrain. Since the remote sensing data is convenient, and the space coverage of remote sensing data is wide, it is compared Traditional field measurement method, the method proposed in the embodiments of the present invention has a low monitoring cost, convenient to update, and can massively output a large area of the lake water three-dimensional terrain simulation results and can be promoted in a wide range. In addition, three-dimensional simulation is performed using the digital elevation model data based on the underwater terrain of the lake, and references the geographic information of the terrain around the lake, and the relationship between the area of different lake spaces and the lake volume can be output.
[0057] In one embodiment, the slope of the pixel in the preset range of the lake water boundary pixel, and the polynomial fitting is also included, and the pixel slope is also included by the following formula:
[0058] Slope WE = [(DEM) i-1,j+1 + 2 × DEM i,j+1 + DEM i+1,j+1 ) - (DEM) i-1,j-1 + 2 × DEM i,j-1 + DEM i+1,j-1 )] ÷ (8 × Cellsize)
[0059] Slope SN = [(DEM) i+1,j-1 + 2 × DEM i+1,j + DEM i+1,j+1 ) - (DEM) i-1,j-1 + 2 × DEM i-1,j + DEM i-1,j+1 )] ÷ (8 × Cellsize)
[0060]
[0061] Among them, DEM i,j For the current calculation of the like, I and J are the ranks of the current calculation of the like element, SLOPE degrees DEM for calculating i,j Large slope value, slope WE Slope SN For the current calculation of the like, the change rate of the east and west and north and south, Cellsize is the spatial resolution of the digital elevation model used.
[0062] In one embodiment, the slope of the pixel in the preset range in the preset range of the lake water boundary pixel, and the polynomial fitting, according to the non-water image of the lake water body boundary The slope size is graded, determined to determine different preset ranges, and the size of the preset range corresponds to the size of the slope.
[0063] Among them, as a preferred alternative, the slope size of the lake water boundary pixel nearest water pixel is determined, respectively, respectively, including the following formula:
[0064]
[0065] Among them, Currentslope is the slope value of the current water pixel of the current lake water boundary pixel, and the upper circle to be calculated has been calculated. MIN and MAX are the slope of all pixels of the lake water bodies, and MaxScale is the prediment range determined by the current lake water boundary pixel.
[0066] In one embodiment, the slope of the pixel in the preset range in the preset range of the lake water boundary pixel in the reverse slope, also includes a polynomial fitting direction:
[0067] SlopewE = [(DEM) i-1,j+1 + 2 × DEM i,j+1 + DEM i+1,j+1 ) - (DEM) i-1,j-1 + 2 × DEM i,j-1 + DEM i+1,j-1 )] ÷ (8 × Cellsize)
[0068] Slope SN = [(DEM) i+1,j-1 + 2 × DEM i+1,j + DEM i+1,j+1 ) - (DEM) i-1,j-1 + 2 × DEM i-1,j + DEM i-1,j+1 )] ÷ (8 × Cellsize)
[0069]
[0070] Among them, DEM i,j For the current calculation of the pixel elevation, I and J are the ranks of the current computational pixel, aspect is the calculated DEM. i,j Large slope value, slope WE Slope SN For the current calculation of the like, the change rate of the east and west and north and south, Cellsize is the pixel size of the digital elevation model used.
[0071] Then, the slope value aspect will convert to the comparative direction value (0 to 360 degrees) according to the following rules:
[0072]
[0073] In one embodiment, the slope of the pixel in the preset range of the lake water boundary pixel in the reverse slope, determines the slope of the lake water boundary pixel, including the following manner :
[0074] FitsLope = Polyfit (x, maxscale-1)
[0075] Using the leastfit function to determine the coefficients from zero-secondary polynomial to maxscale-1 multiplexing in the Polyfit function, and determine the optimal polynomial fitting equation according to the error evaluation of each polynomial fit;
[0076] Among them, FitSlope is a slope of the lake water boundary pixel of the polynomial, X is a key slope value of the lake water boundary pixel to the preset range of pixels, MaxScale is a pixel representing a predetermined range. Number, MAXSCALE-1 is the maximum number of fit polynomials.
[0077] As an alternative embodiment, the error evaluation of the polynomial fit can be determined by the following manner, the average absolute error (MAE) indicator, with an average percentage error (MAE) index, and the average absolute error (MAE) indicator is calculated by the following manner:
[0078]
[0079]
[0080]
[0081] Where Y i For true value, For the analog value, m is numerous number.
[0082] In one embodiment, according to the surrounding slope matrix and the current water surface elevation, by means of a decrease in the height of the surface, iterates the simulation elevation of the primitive of the bare exposed water surface until the water image element is calculated, including:
[0083] The digital elevation model of the statistically obtained as the current calculation elevation, the cellular cell of the water border of the lake water and land two-value matrix, as the calculated region matrix, according to the surrounding slope matrix and the calculated region matrix as the initial condition, Determine the simulation elevation of the cell to be calculated, and update the calculated area matrix until the calculated path to be calculated is lower than the current calculation elevation; gradually reduces the water height according to the preset steps, and will reduce the water after each time it is reduced The elevation is currently calculated as the current calculation, and according to the surrounding slope matrix and elevation of the previous step, the simulation elevation to be calculated to be calculated is determined until the calculated pattern element analog elevation is lower than the current calculation elevation; if all water surface ports Both are calculated to stop, get the underwater terrain matrix of the simulated lake.
[0084] The initialization cyclic iterative parameters are required before step 103: the current calculation elevation, the matrix and the water surface elevation have been calculated. See figure 2 The initial iteration gives the statistically obtained digital elevation model surface elevation as the current calculation elevation. After the current elevation iteration, the current calculation elevation of the next iteration is obtained according to the preset decreasing step. The current calculation elevation of the next iteration is obtained; the initial iteration will be a two-value The pixel of the water border of the matrix is used as the calculated region matrix. After each iterates, the elevation is calculated and recorded, and the calculated area matrix has been calculated; the water surface elevation is subjected to a reduction of each iteration, In the present invention, it is set to 1 meter, the less fined the decreasing step, the less fine, but the corresponding calculation time will be extended; the decreasing step is rough, which may result in a relatively rough partial area. The decline step affects the calculation order of the algorithm.
[0085] The currently calculated cell is defined as that the boundary pixel of the calculated area matrix is higher than the current calculated elevation, which can be determined by the following manner:
[0086] CalculatePoint = CalculateDMatrix pos & DEM pos (DEM) pos H)
[0087] Among them, CalculatePoint is the current like element to be calculated, CalculateDMatrix pos For the inner boundary of the area matrix, DEM pos (DEM) pos H) is higher than the current calculated elevation, & indicates the intersection of both.
[0088] The lake terrain is considered continuous. To determine the pixel of the pixel elevation at a closer to the shore, the demonstration of the pixel to the calculated cells is large, so it is not considered. To be calculated in the direction of the in-line adjacent direction as the current direction to be calculated in the direction of the regional matrix, including the four geographic orientations of east, west, south, north. It is determined that the adjacent direction to be calculated is carried out in the following manner:
[0089] Adjacentdirection = min {DIS N DIS E DIS S DIN W }
[0090] Among them, DIS N KIS E DIS S DIS W For the current horizontal distance of the four geographic orientation of the neutral distance, the west, south, north, and min is the minimum value of the item included.
[0091] Determine that the currently calculated cell elevation is performed by the following manner:
[0092] Z (i) = h (i) -k (i) × Cellsize
[0093] Where z (i) is the simulation elevation of the current calculation, h ((i) and k (i) are elevated and slope of the adjacent point point, and CellSize is the spatial resolution of the digital elevation model used.
[0094] Assume that the slope K is a span ratio The function, which uses the power function and the triangle function to approximate the slope function, and achieve satisfactory results to meet similarity conditions.
[0095]
[0096]
[0097] Where X is the horizontal distance of the current calculation cell and the slope function of the slope, D is the horizontal span, and K0 is the slope of the original boundary point, and n is the parameter of the power function, and n = 1 in the present invention. See image 3.
[0098] When the determined current to be calculated, the current high-band iteration is deemed to end, and the current calculation elevation of the next iteration is obtained according to the preset decrement step, and the current calculated update has been calculated according to whether or not the cell is calculated. And as the initialization parameters of the next iteration, when all of the can't be found to be calculated, that is, all water surface cells are calculated to stop, and output the water terrain matrix of the simulated lake.
[0099] In one embodiment, the water portion is corrected by the water-based underwater topographic matrix to obtain the ultimate lake underwater terrain matrix, including: rehabilitating the elevation elevation as the initial iteration by lifting the water surface elevation elevation of the lake space The current elevation of the calculation performs iterative calculations, resulting in the lifting of the labore underwater terrain simulation results; determined that the land like elevation drowning due to raising the surface elevation, and calculate the simulation elevation and real elevation, respectively, respectively, respectively. The root mean square error, finds the coefficients that minimize the mean square error, as the currently submerged height correction coefficient; fitting the correction coefficient of different submerged heights to obtain a calibration curve on the water depth, and the obtained underwater terrain analog matrix Correction according to different depths, gaining the final three-dimensional terrain simulation results under the ultimate lake water.
[0100] Firstly, the elevation elevation elevation of the lake library will be raised as the current elevation of the initial iterative calculation, and the launch of the lake is raised, and the lake is underwater. Then, then find the land like a land like that is lifting the surface elevation. And according to the lifting height of the image element (known as the submerged height); subsequently calculated the equivalent of the different submerged high degree and the true elevation, looking for the minimal root error The coefficient is as a currently submerged height correction coefficient. Among them, the correction coefficient is a value that minimizes the mean square error is to minimize the error. Finally, the correction coefficient of different submerged heights is fitted to obtain a curve, and the obtained underwater terrain analog matrix is corrected in different depths, obtaining a three-dimensional terrain under the ultimate lake underwater.
[0101] The present invention focuses on the topographic topographic simulation method to solve and achieve: 1. Different lakes in the slope to fluctuate changes. Considering the influence of the three-dimensional terrain simulation, taking into account the three-dimensional terrain simulation, in the calculation of the slope of the lake library, the pixel slope is achieved by the pixel slope to reverse a certain range of pixel slope, with an external Declability; 2. Reduce the error in water parts. The basic principle of the terrain continuation method is that the topography of the water portion and the underwater portion is continuous and similarity, and the three-dimensional terrain simulation is performed after the lake water surface elevation is lifted, and it is submerged by the water surface. Simulation and real elevation, calculated that each of the values of the simulation elevation of each lifting vertical distance correspond to the root mean square error of the real elevation, and finally fitting the correction coefficient of different water depths, obtaining a correction coefficient of different water depths. About the calibration curve of the water depth; 3, fully automatic batch processing. The present invention only needs to input the digital elevation model data containing the lake and its surrounding models, and allows data to be batchted to the data in the folder, and the internal function package is relatively complete, and the operations and applications are very convenient. At the same time, the method overcomes the case where the simulated terrain is discontinuous, so that the three-dimensional terrain simulation of the output of the lake space is more conforming to cognition.
[0102]Next, a three-dimensional terrain analog device based on a digital elevation model based on a digital elevation model is described below. The three-dimensional terrain analog device based on the digital elevation model is described below and the lake water based on the digital elevation model described above. The lower three-dimensional terrain simulation method can correspond to each other.
[0103] Figure 4 It is a schematic structural diagram of a three-dimensional terrain analog device provided by a digital elevation model provided by the present invention, such as Figure 4 As shown, the three-dimensional terrain analog apparatus of the lake base based on the digital elevation model includes: the water distribution module 401, the slope determination module 402, and the terrain processing module 403, and the terrain correction module 404. Among them, the water and land division module 401 is used to generate a lake water and land binary matrix on the water body and non-water image cells according to the digital elevation model of the lake water body and the surrounding land; the slope determination module 402 acquires the lake according to the lake water and land binary matrix The library water boundary, according to the slope of the pixel in the preset range of the lake water boundary pixel, and determines the slope of the lake water body boundary pixel to obtain the surrounding slope matrix; the terrain processing module 403 is used According to the surrounding slope matrix and the current water surface elevation, by hypothetical calculation of the simulation elevation of the cells of the nude exposed water surface until the water image element is calculated until the water image element is calculated, it is calculated to simulate the underwater terrain matrix of the lake. Topographic Correction Module 404 Used to use the water part to the simulated lake underwater terrain matrix to get the final lake underwater terrain matrix.
[0104] The apparatus embodiment according to an embodiment of the present invention is to implement the above method embodiments for implementation of each of the above method embodiments, and will be described later herein.
[0105] According to the embodiment of the present invention, the three-dimensional simulation device based on the digital elevation model is used, and the digital elevation model data is used to perform three-dimensional simulation on the underwater terrain of the lake. Since remote sensing data can be grateful for free, and the spatial coverage of remote sensing data is wide. Therefore, compared to conventional field measurement methods, the method proposed in the embodiments of the present invention has low monitoring cost, convenient to update, and can massively output large-area lake water three-dimensional terrain simulation results and can be promoted over a wide range. The advantages. In addition, three-dimensional simulation is performed using the digital elevation model data based on the underwater terrain of the lake, and references the geographic information of the terrain around the lake, and the relationship between the area of different lake spaces and the lake volume can be output.
[0106] Figure 5 It is a schematic structural diagram of the electronic device provided by the present invention, such as Figure 5 As shown, the electronic device can include: processor 501, communication interface 502, memory 503, and communication bus 504, wherein the processor 501, a communication interface 502, a memory 503 via a communication bus 504. Complete communication between each other. The processor 501 can invoke the logic instructions in the memory 503 to perform a three-dimensional terrain simulation method based on a digital elevation model, including: according to the lake water body and the surrounding terrestrial digital elevation model, generates water body and non-water body image Yuan's lake water and land two-value matrix; obtain the slope of the lake water body according to the lake water and land binary matrix, according to the slope of the like element, according to the slope of the lake water boundary pixel, and perform polynomial fit. Determine the slope of the lake water boundary pixel to obtain a surrounding slope matrix; according to the peripheral slope matrix and the current water surface elevation, by hypotheses the height of the water surface, iterative calculates the simulation elevation of the naked exposed water surface until the water body image is calculated. , Obtain the underwater terrain matrix of the simulated lake; use the water part to the analog lake underwater topographic matrix to get the final lake underwater terrain matrix.
[0107] Further, the logic instructions in the above-described memory 503 can be implemented in a single computer-readable storage medium by software functional units and as a separate product sales or in use. Based on this understanding, the technical solution of the present invention essentially ors a portion of the prior art or a portion of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or some steps of the method of various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, RAD-ONLY MEMORY), RAM, RAM, RANDOM Access Memory, disk, or disc or optical disk, etc. can store program code .
[0108] On the other hand, the present invention also provides a computer program product that includes a computer program stored on a non-transitory computer readable storage medium, the computer program including program instructions, when the program instruction is computer At the time of execution, the computer can perform the three-dimensional terrain simulation method of the lake library based on the above-described method, including: according to the lake water body and the digital elevation model of surrounding terrestrials, generates the water body and non-water body pixel. Lake water and land two-value matrix; according to the lake water and land binary matrix, the lake water border is obtained, according to the slope of the pixel in the preset range of the lake water boundary pixel, the polynomial fit, determine the lake The slope of the waters border is obtained by the surrounding slope matrix; according to the surrounding slope matrix and the current water surface elevation, by hypothesizing the surface height decline, iterates the simulation elevation of the naked exposed water surface until the water image element is calculated, resulting Simulate the underwater terrain matrix of the lake; use the water part to the analog lake underwater terrain matrix to get the final lake underwater terrain matrix.
[0109] Yet another aspect, the present invention also provides a non-transitory computer readable storage medium, which stores a computer program that is implemented when executed by the processor to perform the digital elevation-based model-based lake library provided. Underwater three-dimensional terrain simulation method, the method includes generating a lake water and land binary matrix on water body and non-aqueous acts, according to the lake water body and the digital elevation model of the surrounding land; The water boundary, according to the slope of the pixel in the preset range of the lake water boundary pixel, perform polynomial fitting, determine the slope of the lake water boundary pixel, to obtain a surrounding slope matrix; according to the surrounding slope matrix and current The water surface elevation is assumed to decrease the height of the water surface, and iterates the simulation elevation of the naked exposed water surface until the water image element is calculated to obtain underwater terrain matrix; using the water part to the simulated lake in the analog lake underwater terrain The matrix is corrected to get the ultimate lake underwater terrain matrix.
[0110] The device embodiment described above is merely schematic, wherein the unit as the separation component may be or may not be physically separated, and the components displayed as the unit may or may also be not a physical unit, that is, it can be located One place or can also be distributed to multiple network elements. The object of the present embodiment can be implemented in accordance with the actual needs of the actual needs. One of ordinary skill in the art will understand and implement in the case where there is no creative labor.
[0111] Through the description of the above embodiments, those skilled in the art will clearly understand that the embodiments can be implemented by means of software plus necessary, of course, can, of course, can be passed through hardware. Based on this, the above technical solution essentially or contributes to the prior art, the computer software product can be stored in a computer readable storage medium, such as ROM / RAM, magnetic Disc, optical disc, etc., including several instructions to enable a computer device (can be a personal computer, server, or network device, etc.) to perform various embodiments of certain portions of various embodiments or embodiments.
[0112] It will be noted in that the above embodiment is intended to illustrate the technical solutions of the present invention, not to limit the invention; The technical solutions described in the foregoing examples are modified, or part of the technical features in which these modifications or replacements do not allow the nature of the corresponding technical solutions from the spirit and scope of the technical solutions of the present invention.