Methods, devices, electronic equipment and storage media for underwater 3D terrain simulation of rivers

CN122574283APending Publication Date: 2026-08-14AEROSPACE INFORMATION RES INST CAS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0005]本申请提供一种河流水下三维地形模拟方法、装置、电子设备及存储介质,用以解决现有技术中难以在兼顾成本、效率与普适性的前提下,实现对各类河流水下地形的高精度、连续性模拟的缺陷

Benefits of technology

[0014]本申请还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述河流水下三维地形模拟方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122574283A_ABST
    Figure CN122574283A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and storage medium for simulating three-dimensional underwater terrain of rivers, belonging to the field of computer graphics technology. The method includes: determining the optimal resolution of a digital elevation model (DEM); identifying the river's water surface boundary from remote sensing images and extracting the river's centerline based on the water surface boundary; sampling the centerline at fixed intervals, constructing a cross-sectional line at each sampling point, the cross-sectional line being perpendicular to the centerline, the length of the cross-sectional line being determined based on the river's width, and the fixed interval being consistent with the optimal resolution; for each cross-sectional line, simulating the underwater terrain based on the elevation value of the DEM at the cross-sectional line to obtain the cross-sectional underwater terrain; and reconstructing the three-dimensional underwater terrain of the river channel through natural neighborhood interpolation based on the cross-sectional underwater terrain of all cross-sectional lines. This application achieves high-precision and highly continuous three-dimensional underwater terrain reconstruction of rivers without relying on measured water depth data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer graphics technology, and in particular to a method, apparatus, electronic device, and storage medium for simulating three-dimensional underwater terrain of a river. Background Technology

[0002] Underwater topography is fundamental geographic information for describing riverbed morphology, analyzing river channel evolution, and calculating riverbed scouring and deposition. It is also indispensable core data for constructing high-precision digital twin models of water conservancy. In the field of flood control and disaster reduction, accurate underwater topographic data can significantly improve the simulation accuracy of hydrodynamic models, thereby enabling accurate forecasting of flood evolution and providing a scientific basis for flood control command and decision-making. In water resource management and engineering scheduling, underwater topographic data is a key parameter for calculating river and reservoir capacity, assessing reservoir sedimentation, and optimizing scheduling schemes. Therefore, obtaining high-precision and high-reliability underwater topographic data of rivers is of paramount importance for realizing intelligent management and refined scheduling of water conservancy projects and improving the ability to defend against floods and droughts.

[0003] Currently, methods for acquiring underwater topographic data of rivers mainly include field measurements, airborne lidar measurements, and optical satellite remote sensing inversion. Field measurement methods, such as echo sounders, offer high accuracy in clear water with gentle currents, but are inefficient, costly, and suffer from severe acoustic signal attenuation in waters with high sediment content, leading to a significant decrease in measurement accuracy. Airborne lidar technology offers advantages in rapid, wide-area measurement, but its high equipment cost and complex airspace application requirements limit its widespread application in routine hydrological monitoring. Optical satellite remote sensing inversion estimates underwater topography by analyzing the relationship between water spectral reflectance and water depth, offering advantages in wide coverage and convenient data acquisition. However, this method is extremely sensitive to water clarity; in turbid rivers or rivers with high suspended solids concentrations, optical signals attenuate rapidly, making it difficult to guarantee inversion accuracy. In addition, some simulation methods based on terrain similarity theory, although attempting to break free from dependence on measured data, still need improvement in aspects such as the continuity of elevation interpolation, making it difficult to maintain the morphological continuity and realism of terrain simulation in complex river sections.

[0004] In conclusion, how to accurately simulate the underwater topography of various rivers has become an urgent technical problem to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, electronic device, and storage medium for simulating three-dimensional underwater terrain of rivers, in order to overcome the shortcomings of existing technologies in achieving high-precision and continuous simulation of various types of underwater terrain while taking into account cost, efficiency, and universality.

[0006] This application provides a method for simulating three-dimensional underwater terrain of rivers, including the following steps: Determine the optimal resolution of the digital elevation model; After identifying the water surface boundary of the river from the river remote sensing image, the centerline of the river is extracted based on the water surface boundary; The centerline is sampled at fixed intervals, and a cross-sectional line is constructed at each sampling point. The cross-sectional line is perpendicular to the centerline, and the length of the cross-sectional line is determined based on the width of the river. The fixed interval is consistent with the optimal resolution. For each of the cross-sections, the underwater topography is simulated based on the elevation value of the cross-section in the digital elevation model to obtain the underwater topography of the cross section. Based on the underwater topography of all cross-sections, the underwater topography of the river channel is reconstructed using the natural neighborhood interpolation method.

[0007] According to the method for simulating three-dimensional underwater terrain of a river provided in this application, determining the optimal resolution of the digital elevation model includes: The original digital elevation model is resampled at multiple scales to obtain multiple digital elevation models with different resolutions. For each resolution of the digital elevation model, the elevation accuracy loss and terrain smoothing enhancement index are calculated. The elevation accuracy loss reflects the degree of distortion of elevation information caused by the resampling process, and the terrain smoothing enhancement index reflects the degree of smoothness of terrain slope undulation caused by the resampling process. Based on the elevation accuracy loss and terrain smoothing enhancement index at each resolution, the entropy value of the elevation accuracy loss and the entropy value of the terrain smoothing enhancement index are calculated respectively. The weight of the elevation accuracy loss is determined based on the entropy value of the elevation accuracy loss, and the weight of the terrain smoothing and improvement index is determined based on the entropy value of the terrain smoothing and improvement index. For each resolution of the digital elevation model, based on the weight of the elevation accuracy loss and the weight of the terrain smoothing enhancement index, the elevation accuracy loss and the terrain smoothing enhancement index at each resolution are weighted and summed to obtain the comprehensive score of the digital elevation model at each resolution. The resolution with the highest overall score is selected as the optimal resolution.

[0008] According to the method for simulating underwater three-dimensional terrain of a river provided in this application, after identifying the water surface boundary of the river from the river remote sensing image, the method for extracting the centerline of the river based on the water surface boundary includes: After identifying the water surface boundary of the river from the river remote sensing image, the river skeleton line of the river is extracted based on the water surface boundary using morphological algorithms; After extracting the centerline of the river from the river skeleton line, a smoothing process is performed.

[0009] According to the method for simulating three-dimensional underwater terrain of a river provided in this application, before sampling the centerline at fixed intervals and constructing a cross-sectional line at each sampling point, the method further includes: The digital elevation model is cropped to retain the digital elevation model data of the river channel and the buffer zone around the river in the target area. The digital elevation model data is masked based on the water surface boundary, with the water surface elevation value assigned a fixed value while other elevation values ​​remain unchanged.

[0010] According to the method for simulating three-dimensional underwater terrain of a river provided in this application, the underwater terrain is simulated based on the elevation value of the cross-section line using the digital elevation model to obtain the underwater terrain of the cross-section, including: The inflection point pixel of the topographic change closest to the water surface on the left bank is taken as the first simulation starting point. A window containing multiple pixels is constructed to the right of the first simulation starting point. The horizontal distance and elevation value within the window are fitted by a function to determine the slope within the window. The window is slid to the right with a preset step size. After iteratively calculating the first slope sequence from the first simulation starting point to the right water boundary, the first slope sequence is fitted to obtain the left bank slope change function. The first underwater topography is generated based on the left bank slope change function. The inflection point pixel of the topographic change closest to the water surface on the right bank is taken as the second simulation starting point. A window containing multiple pixels is constructed to the left of the second simulation starting point. The horizontal distance and elevation value within the window are fitted by a function to determine the slope within the window. The window is slid to the left with a preset step size. After iteratively calculating the second slope sequence from the second simulation starting point to the left water boundary, the second slope sequence is fitted to obtain the right bank slope change function. The second underwater topography is generated based on the right bank slope change function. Calculate the elevation difference between the first underwater terrain and the second underwater terrain, take the pixel with the smallest elevation difference as the deepest point of the cross-section line, take the deepest point as the boundary, use the first underwater terrain to the left of the boundary and the second underwater terrain to the right of the boundary to obtain the cross-section underwater terrain.

[0011] According to the three-dimensional underwater terrain simulation method for rivers provided in this application, after obtaining the cross-sectional underwater terrain by using the deepest point as a boundary, with the first underwater terrain applied to the left of the boundary and the second underwater terrain applied to the right of the boundary, the method further includes: The water surface is raised, and a correction coefficient is calculated based on the difference between the actual slope of the newly added bank slope and the predicted slope of the underwater topography of the cross section. The newly added bank slope is the bank slope that is newly submerged after the water surface is raised. The underwater topography of the cross section is corrected based on the correction coefficient.

[0012] This application also provides a three-dimensional underwater terrain simulation device for rivers, comprising the following modules: The resolution calculation module includes: determining the optimal resolution of the digital elevation model; The centerline extraction module includes: identifying the water surface boundary of the river from the river remote sensing image, and extracting the centerline of the river based on the water surface boundary; The cross-section line construction module includes: sampling the center line at fixed intervals, constructing a cross-section line at each sampling point, wherein the cross-section line is perpendicular to the center line, the length of the cross-section line is determined based on the width of the river, and the fixed interval is consistent with the optimal resolution. The terrain simulation module includes: for each of the cross-section lines, simulating the underwater terrain based on the elevation value of the cross-section line in the digital elevation model, to obtain the underwater terrain of the cross-section; The terrain reconstruction module includes: reconstructing the underwater terrain of the river channel based on the cross-sectional underwater terrain of all cross-sections using the natural neighborhood interpolation method.

[0013] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described methods for simulating three-dimensional underwater terrain of a river.

[0014] This application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the underwater three-dimensional terrain simulation method for rivers as described above.

[0015] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the above-described methods for simulating three-dimensional underwater terrain of a river.

[0016] The method, apparatus, electronic equipment, and storage medium for underwater three-dimensional topography simulation of rivers provided in this application infer underwater topography using known elevation information from both banks of the river. On the one hand, since digital elevation model data is not affected by water turbidity, it can be applied to various water environments, including highly turbid rivers, greatly expanding the application scope of underwater topography simulation. On the other hand, it only requires publicly available digital elevation model data and easily accessible river remote sensing imagery as input, without the need for any on-site wading surveys or expensive aerial operations. This not only greatly reduces data acquisition costs but also completely avoids safety risks associated with personnel wading in water. This method enables large-scale, high-frequency simulation of underwater river topography. Furthermore, by accurately extracting the river's centerline from remote sensing imagery and then constructing a series of cross-sectional lines perpendicular to this centerline at fixed intervals, the simulation process ensures that it follows the natural course of the river. At each cross-section, the elevation information of both banks is used to simulate the underwater portion, effectively maintaining the natural transition morphology of the river channel cross-section. Finally, by integrating the simulation results of all cross-sections, the underwater topography of the entire river channel is reconstructed, generating a digital elevation model that both conforms to the measured data points and maintains the smooth and continuous morphology of the river channel, effectively avoiding the generation of abnormal areas. In summary, this application achieves high-precision, high-continuity three-dimensional underwater topography reconstruction of river channels without relying on measured water depth data. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is one of the flowcharts illustrating the underwater three-dimensional terrain simulation method for rivers provided in this application; Figure 2 This is the second flowchart of the underwater three-dimensional terrain simulation method for rivers provided in this application; Figure 3 This is a schematic diagram of the underwater three-dimensional terrain simulation device for rivers provided in this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0020] The following is combined with Figures 1 to 4 This application describes the method, apparatus, electronic equipment, and storage medium for simulating three-dimensional underwater terrain of rivers.

[0021] Figure 1 This is one of the flowcharts illustrating the underwater three-dimensional terrain simulation method for rivers provided in this application, such as... Figure 1 As shown, the method includes the following: S110, determine the optimal resolution of the digital elevation model; S120, After identifying the water surface boundary of the river from the river remote sensing image, the centerline of the river is extracted based on the water surface boundary; S130, the centerline is sampled at fixed intervals, and a cross-sectional line is constructed at each sampling point. The cross-sectional line is perpendicular to the centerline, and the length of the cross-sectional line is determined based on the width of the river. The fixed interval is consistent with the optimal resolution. S140, For each of the cross-section lines, the underwater topography is simulated based on the elevation value of the cross-section line by the digital elevation model to obtain the underwater topography of the cross-section; S150, based on the underwater topography of all cross-sections, reconstructs the three-dimensional underwater topography of the river channel through the natural neighborhood interpolation method.

[0022] It should be noted that the execution subject of the underwater three-dimensional terrain simulation method for rivers provided in this application embodiment can be a server, computer equipment, such as mobile phone, tablet computer, laptop computer, handheld computer, vehicle electronic equipment, wearable device, ultra-mobile personal computer (UMPC), netbook or personal digital assistant (PDA), etc.

[0023] In S110, the Digital Elevation Model (DEM) is a dataset that records the surface elevation using a regular grid. The resolution is the size of the DEM grid. Too high a resolution results in a large data volume and slow computation; too low a resolution leads to loss of detail and poor accuracy. Therefore, appropriately determining the DEM resolution is crucial for simulation accuracy.

[0024] In some embodiments, the optimal resolution is determined based on the river width and the degree of terrain variation. For example, when the average river width is less than 100 meters, a resolution of 0.1 meters is selected; when it is between 100 and 500 meters, a resolution of 0.5 meters is selected; and when it is greater than 500 meters, a resolution of 1 meter is selected.

[0025] In other embodiments, the degree of topographic relief is used to determine the river section with large undulations and high resolution, while the gentle river section is used with low resolution.

[0026] In S120, the centerline is a virtual line in the middle of the river channel, representing the framework of the river's direction.

[0027] In some embodiments, the identification of water surface boundaries can use a threshold segmentation method, for example, setting a threshold for the spectral difference between water and land to automatically delineate the water surface area.

[0028] In other embodiments, water surface boundary identification uses a deep learning model, such as the U-Net network, which is trained to automatically identify water body boundaries.

[0029] In some embodiments, the centerline is extracted using a morphological thinning algorithm that continuously erodes the water surface area until only a single line remains.

[0030] In other embodiments, the centerline is extracted using a skeleton extraction algorithm, such as the Voronoi diagram method, to generate the intermediate skeleton line from the boundary points.

[0031] In S130, the cross-section line is a short line perpendicular to the centerline that crosses the river channel and is used to simulate the shape of the riverbed cross-section.

[0032] Here, the centerline is sampled at fixed intervals to construct the cross-sectional line. The fixed interval is the optimal resolution in S110. For example, the optimal resolution is 0.1 meters, which means that a point is taken on the centerline every 0.1 meters. At each sampling point, a line segment perpendicular to the centerline is drawn as the cross-sectional line. The length of the cross-sectional line is determined by the width of the river. For example, the length of the cross-sectional line is set to 1.2-1.5 times the width of the river at that location to ensure that it covers the entire riverbed and extends to both banks.

[0033] In S140, underwater topography is simulated for each cross-section line based on the elevation values ​​of the DEM. After the cross-section line crosses the water surface, there is no real elevation data for the underwater part. In this case, interpolation is performed using known elevation points on both banks. For example, the elevations of the two ends of the cross-section line on the shore are known, and the underwater part in the middle can be estimated using parabolic fitting, cubic spline interpolation, or inverse distance weighting. The parabolic fitting method assumes that the riverbed is parabolic in shape, calculates the parabolic equation using the elevations of the two ends and the river width, and directly substitutes the elevation of the middle point into the calculation. Cubic spline interpolation is smoother and suitable for river sections with complex topographic changes.

[0034] In S150, the simulation results of all cross-sections are stitched together, and interpolation algorithms are used to fill in the gaps between the cross-sections to generate a complete underwater 3D topographic model of the river channel. Commonly used methods include Kriging interpolation, inverse distance weighted interpolation, or triangular mesh interpolation.

[0035] Optionally, after completing all cross-section simulations, a cross-section point cloud is generated along the river centerline, and surface reconstruction is performed using natural neighborhood interpolation. This method features strong locality and smooth boundary transitions, maintaining the continuity of terrain features between cross-sections and avoiding over-smoothing or anomalous oscillations caused by traditional global interpolation methods. The final result is a complete underwater 3D terrain with realistic spatial structure.

[0036] The underwater three-dimensional topography simulation method for rivers provided in this application uses known elevation information on both banks of the river to infer the underwater topography. On the one hand, since digital elevation model data is not affected by water turbidity, it can be applied to various water environments, including rivers with high turbidity, greatly expanding the application scope of underwater topography simulation. On the other hand, it only requires publicly available digital elevation model data and easily accessible river remote sensing images as input, without the need for any on-site wading surveys or expensive aerial operations. This not only greatly reduces data acquisition costs but also completely avoids the safety hazards of personnel wading in water. This invention enables large-scale, high-frequency simulation of underwater river topography. Furthermore, it accurately extracts the river centerline from remote sensing imagery and then constructs a series of cross-sectional lines perpendicular to this centerline at fixed intervals. This ensures the simulation follows the natural course of the river. At each cross-section, elevation information from both banks is used to simulate the underwater portion, effectively maintaining the natural transition morphology of the river channel cross-section. Finally, by integrating the simulation results from all cross-sections, the underwater topography of the entire river channel is reconstructed, generating a digital elevation model that both conforms to the measured data points and maintains a smooth and continuous river channel morphology, effectively avoiding the generation of abnormal areas. In summary, this application achieves high-precision and highly continuous underwater river topography reconstruction without relying on measured water depth data.

[0037] In an optional embodiment, determining the optimal resolution of the digital elevation model includes: The original digital elevation model is resampled at multiple scales to obtain multiple digital elevation models with different resolutions. For each resolution of the digital elevation model, the elevation accuracy loss and terrain smoothing enhancement index are calculated. The elevation accuracy loss reflects the degree of distortion of elevation information caused by the resampling process, and the terrain smoothing enhancement index reflects the degree of smoothness of terrain slope undulation caused by the resampling process. Based on the elevation accuracy loss and terrain smoothing enhancement index at each resolution, the entropy value of the elevation accuracy loss and the entropy value of the terrain smoothing enhancement index are calculated respectively. The weight of the elevation accuracy loss is determined based on the entropy value of the elevation accuracy loss, and the weight of the terrain smoothing and improvement index is determined based on the entropy value of the terrain smoothing and improvement index. For each resolution of the digital elevation model, based on the weight of the elevation accuracy loss and the weight of the terrain smoothing enhancement index, the elevation accuracy loss and the terrain smoothing enhancement index at each resolution are weighted and summed to obtain the comprehensive score of the digital elevation model at each resolution. The resolution with the highest overall score is selected as the optimal resolution.

[0038] Here, multi-scale sampling refers to the process of converting an original, fixed-resolution Digital Elevation Model (DEM) into a DEM dataset with varying resolutions using mathematical methods. Essentially, it involves redrawing the same terrain using grids of different sizes. Elevation accuracy loss measures how much original elevation information is lost during the resampling and coarsening process; lower resolution results in greater detail loss and accuracy reduction. Terrain smoothing enhancement measures how much the terrain undulations are smoothed out after resampling; lower resolution leads to gentler slopes and deeper valleys, resulting in greater smoothness.

[0039] Here, entropy is used to objectively measure the amount of information contained in the two indicators of elevation accuracy loss and terrain smoothing improvement, thereby avoiding the subjectivity of manually setting weights. The greater the variation and disorder of an indicator's value across different resolutions, the higher its entropy value, which means it carries more decision-making information.

[0040] The raw DEM obtained from UAV aerial photography is assumed to have a resolution of 0.1m. While this provides extremely high accuracy, directly using it to simulate underwater terrain can lead to complex results and high noise levels. Excessively high resolution retains too many micro-topographic details, making it susceptible to interference from local anomalies (such as shoreline rocks); conversely, excessively low resolution loses key terrain features. Therefore, determining a reasonable DEM resolution is crucial for simulation accuracy. The main factors influencing DEM resolution selection include: ① the balance between accuracy loss and terrain smoothness; ② computational efficiency; and ③ river width. Since computational efficiency can be achieved through hardware optimization, this application focuses on balancing terrain accuracy and smoothness.

[0041] In this embodiment, the original, high-precision DEM data is resampled to generate a series of DEMs with resolutions ranging from fine to coarse. For each generated DEM, two values ​​need to be calculated: using the original high-precision DEM as a reference, the difference between the elevation value of the current resolution DEM and the reference value is calculated to obtain the elevation accuracy loss; the terrain undulation of the current resolution DEM is calculated and compared with the original DEM to obtain the terrain smoothing improvement index.

[0042] In some embodiments, the root mean square error (RMSE) is used to characterize the elevation accuracy loss. This involves calculating the root mean square error (RMSE) of the elevation difference between two DEMs at the same location. The larger the RMSE value, the more severe the elevation accuracy loss. In other embodiments, the information entropy difference is used to characterize the elevation accuracy loss. This involves calculating the elevation information entropy of the original DEM and the current resolution DEM, respectively. The difference between the two is the accuracy loss. The greater the decrease in entropy value, the more terrain information is lost.

[0043] In some embodiments, the terrain smoothing improvement index is characterized by standard deviation, which is calculated by the standard deviation of slope values ​​over the entire area. The smaller the standard deviation, the smoother the terrain. Therefore, the terrain smoothing improvement index can be defined as the difference between the standard deviation of the original DEM slope and the standard deviation of the current DEM slope. In other embodiments, the terrain smoothing improvement index is characterized by average slope, which is calculated by the average slope over the entire area. The lower the average slope, the gentler the terrain. Therefore, the terrain smoothing improvement index can be defined as the difference between the average slope of the original DEM and the average slope of the current DEM.

[0044] Furthermore, to determine the optimal values ​​for both indicators, the entropy weight method is used for a comprehensive evaluation. Entropy, originally a concept from thermodynamics, was introduced into information theory by C.E. Shannon to characterize the degree of disorder in a system. It can quantify the amount of information provided by each indicator and analyze its proportion within the system. The amount of information is quantified using the concepts of entropy value and entropy weight. As a comprehensive evaluation method for describing indicators of complex systems, the entropy weight method has been widely applied in many fields such as engineering and economics. The core idea of ​​the entropy weight method is as follows: the entropy value of an indicator is inversely proportional to its entropy weight.

[0045] Specifically, elevation accuracy loss values ​​at all resolutions are collected to form a sequence, and the entropy value of this sequence is calculated using the Shannon information entropy formula; terrain smoothing enhancement index values ​​at all resolutions are collected to form a sequence, and the entropy value of this sequence is calculated using the Shannon information entropy formula; weights are calculated based on the entropy values, and the larger the entropy value of an index, the more distinguishing information it provides between different resolutions, and the higher the weight it should be assigned.

[0046] Furthermore, for each resolution DEM, using the objective weights obtained in the previous step, a weighted sum is calculated for its elevation accuracy loss and terrain smoothing enhancement indices to obtain a comprehensive score. It should be noted that these two indices should be normalized or their dimensions and directions of change should be consistent when calculating the score. Finally, the resolution with the optimal comprehensive score is selected as the optimal resolution.

[0047] In the specific implementation process, the original DEM is resampled into a multi-level DEM set. For example, the 0.1m DEM is resampled into a set of 10 DEMs with resolutions ranging from 0.1 to 1.0m, and two indicators are calculated: elevation accuracy loss and terrain smoothing improvement index. ; ; in, Due to the loss of elevation accuracy, and These are the elevation values ​​of the original resolution and the resampled DEM, respectively. Total number of valid grid cells; and These represent the slope standard deviations of the original resolution and the resampled DEM, respectively.

[0048] Furthermore, the elevation accuracy loss at different resolutions ( E ) and terrain smoothing enhancement index ( T () as a dual-indicator input. Because E Smaller is better, and T Larger is better. First, normalize both. E Using reverse normalization, T A normalized matrix is ​​formed by using forward normalization. The normalized matrix X The i-th row represents the first row. i Two index values ​​for a sample at resolution n, the first j The columns represent the indicator types. Then, the weight of each sample under each indicator is calculated. And calculate the entropy value according to the information entropy formula. : ; Here, the constant k is used to guarantee the entropy value. The value of is in the range [0,1]. Entropy value This describes the degree of information dispersion of the indicator among samples of different resolutions: if the difference between a certain indicator and each sample is small, its entropy value is large, indicating that the indicator provides less information; conversely, if the difference is large, the amount of information is large.

[0049] This leads to the information utility value. This value reflects the contribution of the indicator to the overall system evaluation. Finally, the objective weights of each indicator are determined based on the information utility value. : ; Finally, the combined score for each resolution is obtained by weighted summation, as shown below: ; in Indicates the first The overall evaluation value for each resolution is calculated. A higher score indicates a better trade-off between maintaining terrain accuracy and improving terrain smoothness. Ultimately, the resolution with the highest overall score is determined as the optimal resolution recommended by the entropy weight method.

[0050] The underwater 3D terrain simulation method for rivers provided in this application introduces the theory of information entropy and objectively calculates weights based entirely on the discreteness of the data itself. If the elevation accuracy loss changes drastically at different resolutions, the entropy value is high, and the weight increases accordingly. This indicates that in the current scenario, accuracy is a more critical decision factor, and vice versa. This data-driven weight allocation method ensures that the optimal resolution is selected based on the inherent laws of the data, rather than human preference, greatly improving the objectivity and scientific nature of the solution. In addition, by constructing two mutually restrictive indicators of elevation accuracy loss and terrain smoothing improvement, and using a comprehensive score to quantify this trade-off, the critical point at which further reducing the resolution will lead to a sharp increase in accuracy loss can be accurately found. Selecting the resolution at this critical point ensures that terrain features are fully preserved while minimizing unnecessary data redundancy, providing reliable basic data for subsequent underwater terrain simulation of rivers.

[0051] In an optional embodiment, after identifying the river's water surface boundary from the river remote sensing image, extracting the river's centerline based on the water surface boundary includes: After identifying the water surface boundary of the river from the river remote sensing image, the river skeleton line of the river is extracted based on the water surface boundary using morphological algorithms; After extracting the centerline of the river from the river skeleton line, a smoothing process is performed.

[0052] Here, morphological algorithms are used to process images by analyzing the shape relationships between pixels. They utilize mathematical morphological operations such as erosion and dilation to alter the image structure, thereby extracting the skeleton representing the river's shape. The river skeleton line is a single-pixel-width line obtained after processing by the morphological algorithm. It preserves the river's topological structure but may contain numerous burrs, noise, or irregular micro-forks in detail. The center line, on the other hand, is a line further refined from the river skeleton line, representing the main flow of the river. Compared to the river skeleton line, it removes non-mainstream branches, making it smoother and more continuous, and serves as the benchmark for constructing the river cross-section.

[0053] In this embodiment, after identifying the river's water surface boundary through remote sensing imagery and generating a binary mask (white for water and black for land), a morphological thinning algorithm is used to process the white areas. In some embodiments, the binary image is continuously eroded, i.e., pixels at the object's edges are stripped away until the object shrinks to a single-pixel-width line. During the erosion process, specific rules must be followed to ensure that the connectivity of the lines is not destroyed when stripping pixels, ultimately obtaining the river's skeleton line. In other embodiments, the contour point set of the water surface boundary is first extracted, and then Voronoi polygons are generated based on these points. Voronoi polygons divide a plane into multiple regions, where each point is closest to its corresponding boundary point. In the network formed by the edges of these Voronoi polygons, the edges located inside the river constitute the river's skeleton line. This method works well when dealing with wide, irregular river sections.

[0054] Furthermore, the skeleton line obtained in the previous step often contains many small branches and jagged edges, which cannot be directly used as the center line. The skeleton line needs to be pruned to extract the center line. In some embodiments, all branches of the skeleton line are traversed, the length of each branch is calculated, a length threshold is set, and short branches with a length less than the threshold are directly deleted. The remaining main trunk is the initial center line. In other embodiments, starting from one end of the skeleton line, the line is traced, prioritizing paths with longer lengths and less directional change until the other end is reached. This process automatically ignores short branches that fork along the way, thus extracting the center line representing the main direction.

[0055] Furthermore, the extracted preliminary centerline is smoothed to eliminate jagged edges and minor bends. In some embodiments, the centerline is viewed as a sequence of coordinate points, and a Gaussian filter is applied to each point. The new coordinates are a weighted average of multiple points in its neighborhood, with the weights distributed in a Gaussian manner. This effectively eliminates high-frequency jitter and makes the line smoother. In other embodiments, a cubic spline function is used to fit the discrete coordinate points of the centerline. The fitted curve passes through or approximates the original point, but the curve itself is continuous and smooth, which can well preserve the natural curvature of the river.

[0056] Preferably, high-resolution remote sensing imagery acquired by UAVs is used as the data source. The river surface distribution boundaries are extracted in GIS software to generate a vector boundary file of the river body. The river skeleton line is then extracted based on this vector file. The skeleton extraction process is based on a morphological algorithm, and its mathematical expression is as follows: ; in, G Indicates the area of ​​river water. For corrosion operation, For expansion operation, For the scale r structural elements, This represents the radius limit of the river's width. The process involves multi-scale erosion and dilation calculations, and the intersection of the results is taken to obtain the river's skeleton. S(G) After obtaining the skeleton, the centerline is further extracted. Since the original centerline exhibits local jaggedness, it needs to be smoothed. The Savitzky-Golay filtering method is used here. Its core idea is to perform polynomial fitting within the local neighborhood of the centerline coordinate points to calculate the smoothed result. The calculation formula is as follows: ; in, The coordinates of the smoothed centerline point. The original centerline point, For smoothing filter coefficients, m Using half the width of the window, this method can effectively eliminate local noise and jagged edges while preserving the geometric features of the centerline, thereby obtaining a smooth centerline of the target river segment in the study area.

[0057] The underwater three-dimensional terrain simulation method for rivers provided in this application extracts skeleton lines through morphological algorithms, which can more accurately capture the topological structure of rivers. Especially when dealing with bifurcated channels and meandering sections, the skeleton lines can better reflect the true shape of the river channel. Subsequent pruning and smoothing processes effectively remove interference caused by remote sensing image noise or minor irregularities in the riverbank, ensuring the purity and representativeness of the final centerline. Furthermore, the underwater terrain constructed based on this is more natural and reasonable, conforming to the natural geomorphological characteristics of the river.

[0058] In an optional embodiment, before sampling the centerline at fixed intervals and constructing a cross-sectional line at each sampling point, the method further includes: The digital elevation model is cropped to retain the digital elevation model data of the river channel and the buffer zone around the river in the target area. The digital elevation model data is masked based on the water surface boundary, with the water surface elevation value set to 1, while other elevation values ​​remain unchanged.

[0059] In this embodiment of the application, the basic data is preprocessed and labeled before constructing the cross-section lines, thereby improving computational efficiency and providing clear boundary constraints for underwater terrain simulation.

[0060] Specifically, a target area is defined by extending a buffer zone outward from the river's centerline. The width of this buffer zone is greater than the maximum width of the river to ensure complete coverage of the river channel and the simulated terrain areas on both banks. After obtaining the cropped DEM data, a mask is generated using the river surface boundary previously extracted from the remote sensing image. In this mask, pixel values ​​within the water surface area are fixed, while pixel values ​​outside the area remain unchanged.

[0061] Preferably, the DEM generated from UAV imagery is used as the data source. Through cropping, the DEM data of the river channel and its surroundings in the study area are preserved. Then, a mask is applied using the extracted water surface vector file and the DEM data, assigning a value of 1 to the original water surface area of ​​the DEM while leaving the remaining DEM values ​​unchanged. After obtaining the centerline, the corresponding normal (i.e., cross-sectional line) for each centerline point is generated. Specifically, the centerline is sampled at fixed intervals, consistent with the spatial resolution of the DEM data. A cross-sectional line is constructed at each sampling point, its length determined by the river width in the study area, ensuring the cross-sectional line remains perpendicular to the centerline, thus obtaining a series of transverse river cross-sections. Subsequently, GIS software is used to extract the corresponding elevation values ​​of each cross-sectional line on the DEM. The portion of the cross-sectional line falling within the water area has a DEM value of 1, representing the area to be simulated; while the portion of the cross-sectional line outside the water area retains its original DEM elevation value, serving as known usable terrain constraints. This method ensures both the geometric rationality of the cross-sections and provides necessary constraints for subsequent underwater terrain fitting.

[0062] The underwater 3D topography simulation method for rivers provided in this application addresses the issue that the original DEM data often covers a very wide area, including a large number of regions unrelated to the studied river section. By cropping the data, the data range is precisely limited to the river channel and surrounding buffer zone, which can greatly reduce the amount of data to be processed in subsequent steps and improve computational efficiency. Through masking, the elevation values ​​of the water surface area are uniformly marked. On the one hand, this allows the simulation algorithm to clearly identify which are known land elevation points and which are underwater points to be simulated when simulating underwater topography, effectively preventing the algorithm from mistakenly treating the water surface as land elevation and ensuring the logical correctness of the interpolation process. On the other hand, the marked water surface area forms a sharp contrast with the land elevations on both banks, providing a clear boundary for the interpolation algorithm. When simulating underwater topography, the algorithm will use the actual elevations on both banks as constraints to extrapolate inward, thereby ensuring that the simulated riverbed topography can smoothly and naturally connect with the land on both banks, avoiding abrupt changes in elevation or discontinuous cliff effects at the water-land interface, and improving the realism and reliability of the final reconstructed topography.

[0063] In an optional embodiment, the step of simulating the underwater topography based on the elevation value of the cross-section line using the digital elevation model to obtain the underwater topography of the cross-section includes: The inflection point pixel of the topographic change closest to the water surface on the left bank is taken as the first simulation starting point. A window containing multiple pixels is constructed to the right of the first simulation starting point. The horizontal distance and elevation value within the window are fitted by a function to determine the slope within the window. The window is slid to the right with a preset step size. After iteratively calculating the first slope sequence from the first simulation starting point to the right water boundary, the first slope sequence is fitted to obtain the left bank slope change function. The first underwater topography is generated based on the left bank slope change function. The inflection point pixel of the topographic change closest to the water surface on the right bank is taken as the second simulation starting point. A window containing multiple pixels is constructed to the left of the second simulation starting point. The horizontal distance and elevation value within the window are fitted by a function to determine the slope within the window. The window is slid to the left with a preset step size. After iteratively calculating the second slope sequence from the second simulation starting point to the left water boundary, the second slope sequence is fitted to obtain the right bank slope change function. The second underwater topography is generated based on the right bank slope change function. Calculate the elevation difference between the first underwater terrain and the second underwater terrain, take the pixel with the smallest elevation difference as the deepest point of the cross-section line, take the deepest point as the boundary, use the first underwater terrain to the left of the boundary and the second underwater terrain to the right of the boundary to obtain the cross-section underwater terrain.

[0064] Here, the inflection point pixel of topographic change refers to the point where the rate of change of elevation changes significantly. On a river cross-section, this usually corresponds to the turning point from a relatively flat riverbank to an underwater slope.

[0065] In this embodiment, on the left bank of the cross-section, the first pixel with a significantly increased rate of elevation change, i.e., the inflection point of terrain change, is found by searching from the waterline towards the land side and using it as the starting point for simulation. Centered on this first simulation starting point, a window containing multiple pixels is constructed to its right (towards the center of the river channel). A linear function is fitted to the lateral distance and elevation values ​​of all pixels within the window; the slope of the fitted line is the local slope of the window. The window is then slid to the right by a preset step size, and the above fitting process is repeated to obtain the slope at the next location. This process is iterated until the window reaches the right boundary of the water area, thus obtaining a first slope sequence from the left bank starting point to the water boundary. The first slope sequence is then smoothly fitted to obtain a continuous left bank slope change function. Then, using the elevation of the first simulation starting point as the initial value, this function is integrated to calculate the elevation of all locations from the left bank starting point to the center of the river channel, forming the first underwater terrain. Starting from the right bank, the second underwater terrain is generated symmetrically. At this point, for the underwater portion of the river channel, there are two sets of independently calculated elevation data. The elevation difference between the first and second underwater topographic features at each pixel location in the overlapping area is calculated. The pixel with the smallest elevation difference is found, which is the deepest point simulated in the entire cross-section, representing the lowest point of the riverbed. This point is used as the dividing line. The underwater portion to the left of the dividing line uses the data from the first underwater topographic feature, and the underwater portion to the right of the dividing line uses the data from the second underwater topographic feature, thus generating a complete and continuous cross-sectional underwater topography.

[0066] In the specific implementation process, the pixels closest to the water surface (i.e., DEM values ​​of approximately 1) on both the left and right sides of the cross-section DEM are determined, and their maximum elevation values ​​are taken as the water level reference for the cross-section. Subsequently, slope fitting analysis was performed on both the left and right banks. Taking the left bank as an example, the peak detection algorithm was used to determine the topographic change inflection point pixel closest to the water surface as the simulation starting point, and a small window containing 4 pixels was constructed in its right neighboring direction. Let the lateral distance and elevation of the pixels within the window be denoted as . A linear function was used for fitting: Where the slope 'a' represents the local slope, and the pixel spacing is the DEM resolution, which is a constant. The slope can then be directly expressed as: ; Where the slope a The local slope S = |a| is represented, and the inflection point cell is assigned its slope. Then, a sliding window is used to obtain the first cell and introduce the next cell, repeating the above process to obtain the complete slope sequence from the terrain inflection point to the water boundary. .

[0067] Furthermore, to simulate underwater topography, the slope sequence was first linearly fitted to obtain the pattern of slope variation. Then, the slope was simulated for each underwater pixel by entering the water area horizontally, using the fitted function and combining it with the lateral step size. The elevation is calculated recursively to gradually generate underwater topography along the left bank until the deepest point on the right bank is reached. The same method is used on the right bank until the left bank is reached. Finally, the elevation difference between the two banks is calculated within the water area. ; in, This represents the water depth distribution extrapolated based on the slope of the left bank. This indicates that the water depth distribution is extrapolated based on the right bank slope. The position with the smallest difference is taken as the deepest point of the cross section. Using this point as the boundary, the elevation of the left bank is assigned to the left water area, and the elevation of the right bank is assigned to the right water area, thus forming a complete underwater cross section elevation distribution.

[0068] The underwater three-dimensional topography simulation method for rivers provided in this application fully utilizes the morphological information of the landforms on both banks by starting from the inflection point of the riverbank and iteratively calculating the slope through a sliding window. It assumes that the slope change of the underwater topography is a natural continuation of the slope change of the land, thus simulating a more realistic, asymmetrical, and complex riverbed profile. Extrapolating inward from both banks inevitably leads to data overlap and conflict in the central region of the river channel. Based on the principle of minimizing elevation difference, the deepest point is found and stitched together. Taking advantage of the general rule that the center of the riverbed is usually the lowest point, the two extrapolation results are seamlessly connected at the most reasonable location, ensuring both accuracy and stability. By preserving the unique topographic features of both banks and avoiding unreasonable phenomena such as abrupt elevation changes or bimodal peaks in the central area, the method further ensures that the final generated cross-section is smooth, continuous, and rationally shaped. In addition, since it does not rely on a preset symmetry model but calculates independently from both banks, it can perfectly handle asymmetrical river channels. For example, if one side is a steep rock wall and the other side is a gentle sandy beach, this method can capture these two very different slope change trends and generate matching underwater topography with one side steep and the other gentle. It has strong adaptability and robustness when facing diverse river morphologies.

[0069] In an optional embodiment, after obtaining the cross-sectional underwater topography by using the deepest point as a boundary, with the first underwater topography applied to the left of the boundary and the second underwater topography applied to the right of the boundary, the method further includes: The water surface is raised, and a correction coefficient is calculated based on the difference between the actual slope of the newly added bank slope and the predicted slope of the underwater topography of the cross section. The newly added bank slope is the bank slope that is newly submerged after the water surface is raised. The underwater topography of the cross section is corrected based on the correction coefficient.

[0070] This application derives underwater topography from known surface topography, that is, it extrapolates unknown parts using limited known information. However, a single simulation using limited known conditions often fails to yield ideal underwater topography results. Therefore, this application's embodiments further refine the initial simulation results to improve reconstruction accuracy. Specifically, the bank slope data is smoothed in the cross-sectional DEM, and the raised water level is used as a constraint. The underwater topography is extended from both the left and right banks using slope fitting and recursion. After obtaining the raised bank slope topography, the difference between it and the original bank slope is calculated, and correction coefficients for the left and right banks are obtained based on a distance-weighted constraint fitting method. The advantage of weighted fitting is that it can assign higher weights to data near the water boundary, thereby enhancing the constraint effect at key locations and reducing the interference of local errors on the overall correction results. Finally, these correction coefficients can be used to correct the overall underwater topography simulation results of the cross-section.

[0071] In the specific implementation process, the water surface boundary of the current cross-section is raised by a preset step size, for example, simulating a water level rise of 0.5 meters. Between the new, higher water surface boundary and the original water surface boundary, a ring-shaped or strip-shaped area will be formed. This area is the newly added bank slope. Since it is located above the original water surface, its elevation data is directly derived from the DEM (Digital Elevation Model), making it accurate and reliable. Using the DEM data, the average slope or slope change trend of the newly added bank slope area is calculated. The underwater topography corresponding to the location of the newly added bank slope, simulated by the aforementioned technical solution, is found. Based on the difference between the actual slope and the predicted slope, a correction coefficient is calculated. Using the calculated correction coefficient, the simulated underwater topography of the entire cross-section is adjusted.

[0072] In some embodiments, a correction coefficient K is determined based on the ratio of the actual slope to the predicted slope. If the predicted slope is gentler than the actual slope, then K>1, indicating that the slope of the simulated terrain needs to be amplified. In other embodiments, a correction coefficient is determined based on the difference between the actual slope and the predicted slope. This difference can be used directly as an elevation correction or as a parameter to adjust the slope function.

[0073] In some embodiments, the depth difference of each point in the simulated underwater terrain relative to the starting point of the water surface is multiplied by a correction factor K. For example, if the original simulated depth of a point is D, the corrected depth is D×K, thereby changing the steepness of the riverbed as a whole. In other embodiments, if the underwater terrain is generated by a function, the correction factor K is used to adjust the parameters of the function. For example, the slope term in the function is multiplied by K, and then the function is re-integrated to generate a new underwater terrain, thereby controlling the correction process more finely.

[0074] The underwater three-dimensional terrain simulation method for rivers provided in this application can quantify the systematic bias of the model by comparing the predicted value and the actual value of the model in this test area. Then, this bias is used to correct the prediction results of the model in truly unknown areas, giving the model a self-learning and calibration capability, so that its prediction results are optimized solutions verified and adjusted by real data, thereby greatly improving the simulation accuracy.

[0075] Figure 2 This is the second flowchart illustrating the underwater three-dimensional terrain simulation method for rivers provided in this application, as shown below. Figure 2 As shown, this application introduces the entropy weight method to objectively and comprehensively evaluate the elevation accuracy preservation and terrain smoothing improvement of DEMs at different resolutions. This avoids the subjectivity and instability problems caused by relying on experience or a single index to select DEM resolution in existing technologies. It provides a clear mathematical basis and engineering repeatability for determining DEM resolution, thus providing more reasonable and reliable basic data for subsequent underwater terrain simulation. Based on the similarity between above-water and underwater terrain in terms of morphological features and spatial continuity, it uses known above-water terrain information to extrapolate and reconstruct unknown underwater areas. This enables continuous simulation of underwater terrain in river sections even when measured water depth is lacking or measurement conditions are limited. It effectively reduces reliance on field measurements and high-cost equipment, improves the engineering applicability of underwater terrain acquisition, and provides stable and reliable terrain support data for hydrodynamic analysis and flood control scheduling in water conservancy digital twin systems. Using existing DEM data as the main input, it further analyzes the above-water... The analysis and extrapolation of underwater topographic features does not rely on measured water depth data or high-density field surveys. It can complete underwater topographic simulation even under limited measurement conditions or high measurement costs, effectively reducing engineering implementation costs and improving the feasibility and scalability of the technology. It does not rely on spectral information from optical images and is unaffected by weather conditions, lighting conditions, or changes in water turbidity. This overcomes the problem of significant accuracy degradation in existing optical remote sensing inversion methods in high-sediment water bodies, turbid rivers, or complex hydrological environments, exhibiting stronger environmental adaptability and engineering stability. Based on topographic similarity and spatial continuity constraints, underwater topographic extrapolation can achieve continuous reconstruction of underwater topography while ensuring the rationality of the overall topographic structure. This avoids excessive influence of local anomaly measurement errors or data gaps on the overall simulation results, making the generated underwater topographic model more consistent with actual river evolution characteristics. It is suitable for hydrodynamic simulation and flood control scheduling analysis in water conservancy digital twin systems.

[0076] The underwater three-dimensional terrain simulation device for rivers provided in this application is described below. The underwater three-dimensional terrain simulation device described below and the underwater three-dimensional terrain simulation method described above can be referred to in correspondence.

[0077] Figure 3This is a schematic diagram of the underwater three-dimensional terrain simulation device for rivers provided by the present invention, as shown below. Figure 3 As shown, the underwater three-dimensional terrain simulation device for rivers may include, but is not limited to: The resolution calculation module 310 includes: determining the optimal resolution of the digital elevation model; The centerline extraction module 320 includes: identifying the water surface boundary of the river from the river remote sensing image, and extracting the centerline of the river based on the water surface boundary; The cross-section line construction module 330 includes: sampling the center line at fixed intervals, constructing a cross-section line at each sampling point, wherein the cross-section line is perpendicular to the center line, the length of the cross-section line is determined based on the width of the river, and the fixed interval is consistent with the optimal resolution. The terrain simulation module 340 includes: for each of the cross-section lines, simulating the underwater terrain based on the elevation value of the cross-section line in the digital elevation model, to obtain the underwater terrain of the cross-section; The terrain reconstruction module 350 includes: underwater terrain of the river channel based on the cross-sectional lines, and reconstructs the three-dimensional underwater terrain of the river channel through the natural neighborhood interpolation method.

[0078] It should be noted that the underwater three-dimensional terrain simulation device for rivers provided in this embodiment of the invention can execute the underwater three-dimensional terrain simulation method for rivers described in any of the above embodiments during specific operation, and this embodiment will not elaborate on this.

[0079] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communications interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communications interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a method for simulating three-dimensional underwater terrain of a river, the method including: Determine the optimal resolution of the digital elevation model; After identifying the water surface boundary of the river from the river remote sensing image, the centerline of the river is extracted based on the water surface boundary; The centerline is sampled at fixed intervals, and a cross-sectional line is constructed at each sampling point. The cross-sectional line is perpendicular to the centerline, and the length of the cross-sectional line is determined based on the width of the river. The fixed interval is consistent with the optimal resolution. For each of the cross-sections, the underwater topography is simulated based on the elevation value of the cross-section in the digital elevation model to obtain the underwater topography of the cross section. Based on the underwater topography of all cross-sections, the three-dimensional underwater topography of the river channel is reconstructed using the natural neighborhood interpolation method.

[0080] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0081] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the underwater three-dimensional terrain simulation method for rivers provided by the above methods, the method including: Determine the optimal resolution of the digital elevation model; After identifying the water surface boundary of the river from the river remote sensing image, the centerline of the river is extracted based on the water surface boundary; The centerline is sampled at fixed intervals, and a cross-sectional line is constructed at each sampling point. The cross-sectional line is perpendicular to the centerline, and the length of the cross-sectional line is determined based on the width of the river. The fixed interval is consistent with the optimal resolution. For each of the cross-sections, the underwater topography is simulated based on the elevation value of the cross-section in the digital elevation model to obtain the underwater topography of the cross section. Based on the underwater topography of all cross-sections, the three-dimensional underwater topography of the river channel is reconstructed using the natural neighborhood interpolation method.

[0082] Furthermore, this application also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the river underwater three-dimensional terrain simulation method provided by the methods described above, the method comprising: Determine the optimal resolution of the digital elevation model; After identifying the water surface boundary of the river from the river remote sensing image, the centerline of the river is extracted based on the water surface boundary; The centerline is sampled at fixed intervals, and a cross-sectional line is constructed at each sampling point. The cross-sectional line is perpendicular to the centerline, and the length of the cross-sectional line is determined based on the width of the river. The fixed interval is consistent with the optimal resolution. For each of the cross-sections, the underwater topography is simulated based on the elevation value of the cross-section in the digital elevation model to obtain the underwater topography of the cross section. Based on the underwater topography of all cross-sections, the three-dimensional underwater topography of the river channel is reconstructed using the natural neighborhood interpolation method.

[0083] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0084] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for simulating three-dimensional underwater terrain of rivers, characterized in that, include: Determine the optimal resolution of the digital elevation model; After identifying the water surface boundary of the river from the river remote sensing image, the centerline of the river is extracted based on the water surface boundary; The centerline is sampled at fixed intervals, and a cross-sectional line is constructed at each sampling point. The cross-sectional line is perpendicular to the centerline, and the length of the cross-sectional line is determined based on the width of the river. The fixed interval is consistent with the optimal resolution. For each of the cross-sections, the underwater topography is simulated based on the elevation value of the cross-section in the digital elevation model to obtain the underwater topography of the cross section. Based on the underwater topography of all cross-sections, the three-dimensional underwater topography of the river channel is reconstructed using the natural neighborhood interpolation method.

2. The method for simulating three-dimensional underwater terrain of rivers according to claim 1, characterized in that, Determining the optimal resolution of the digital elevation model includes: The original digital elevation model is resampled at multiple scales to obtain multiple digital elevation models with different resolutions. For each resolution of the digital elevation model, the elevation accuracy loss and terrain smoothing enhancement index are calculated. The elevation accuracy loss reflects the degree of distortion of elevation information caused by the resampling process, and the terrain smoothing enhancement index reflects the degree of smoothness of terrain slope undulation caused by the resampling process. Based on the elevation accuracy loss and terrain smoothing enhancement index at each resolution, the entropy value of the elevation accuracy loss and the entropy value of the terrain smoothing enhancement index are calculated respectively. The weight of the elevation accuracy loss is determined based on the entropy value of the elevation accuracy loss, and the weight of the terrain smoothing and improvement index is determined based on the entropy value of the terrain smoothing and improvement index. For each resolution of the digital elevation model, based on the weight of the elevation accuracy loss and the weight of the terrain smoothing enhancement index, the elevation accuracy loss and the terrain smoothing enhancement index at each resolution are weighted and summed to obtain the comprehensive score of the digital elevation model at each resolution. The resolution with the highest overall score is selected as the optimal resolution.

3. The method for simulating three-dimensional underwater terrain of rivers according to claim 1, characterized in that, After identifying the river's water surface boundary from the river remote sensing image, the process of extracting the river's centerline based on the water surface boundary includes: After identifying the water surface boundary of the river from the river remote sensing image, the river skeleton line of the river is extracted based on the water surface boundary using morphological algorithms; After extracting the centerline of the river from the river skeleton line, a smoothing process is performed.

4. The method for simulating three-dimensional underwater terrain of rivers according to claim 1, characterized in that, Before sampling the centerline at fixed intervals and constructing a cross-sectional line at each sampling point, the method further includes: The digital elevation model is cropped to retain the digital elevation model data of the river channel and the buffer zone around the river in the target area. The digital elevation model data is masked based on the water surface boundary, with the water surface elevation value assigned a fixed value while other elevation values ​​remain unchanged.

5. The method for simulating three-dimensional underwater terrain of rivers according to claim 4, characterized in that, The underwater topography is simulated based on the elevation value of the cross-section line using the digital elevation model to obtain the underwater topography of the cross-section, including: The inflection point pixel of the topographic change closest to the water surface on the left bank is taken as the first simulation starting point. A window containing multiple pixels is constructed to the right of the first simulation starting point. The horizontal distance and elevation value within the window are fitted by a function to determine the slope within the window. The window is slid to the right with a preset step size. After iteratively calculating the first slope sequence from the first simulation starting point to the right water boundary, the first slope sequence is fitted to obtain the left bank slope change function. The first underwater topography is generated based on the left bank slope change function. The inflection point pixel of the topographic change closest to the water surface on the right bank is taken as the second simulation starting point. A window containing multiple pixels is constructed to the left of the second simulation starting point. The horizontal distance and elevation value within the window are fitted by a function to determine the slope within the window. The window is slid to the left with a preset step size. After iteratively calculating the second slope sequence from the second simulation starting point to the left water boundary, the second slope sequence is fitted to obtain the right bank slope change function. The second underwater topography is generated based on the right bank slope change function. Calculate the elevation difference between the first underwater terrain and the second underwater terrain, take the pixel with the smallest elevation difference as the deepest point of the cross-section line, take the deepest point as the boundary, use the first underwater terrain to the left of the boundary and the second underwater terrain to the right of the boundary to obtain the cross-section underwater terrain.

6. The method for simulating three-dimensional underwater terrain of rivers according to claim 5, characterized in that, After obtaining the cross-sectional underwater topography using the deepest point as a boundary, with the first underwater topography applied to the left of the boundary and the second underwater topography applied to the right of the boundary, the process further includes: The water surface is raised, and a correction coefficient is calculated based on the difference between the actual slope of the newly added bank slope and the predicted slope of the underwater topography of the cross section. The newly added bank slope is the bank slope that is newly submerged after the water surface is raised. The underwater topography of the cross section is corrected based on the correction coefficient.

7. A three-dimensional underwater terrain simulation device for rivers, characterized in that, The resolution calculation module includes: determining the optimal resolution of the digital elevation model; The centerline extraction module includes: identifying the water surface boundary of the river from the river remote sensing image, and extracting the centerline of the river based on the water surface boundary; The cross-section line construction module includes: sampling the center line at fixed intervals, constructing a cross-section line at each sampling point, wherein the cross-section line is perpendicular to the center line, the length of the cross-section line is determined based on the width of the river, and the fixed interval is consistent with the optimal resolution. The terrain simulation module includes: for each of the cross-section lines, simulating the underwater terrain based on the elevation value of the cross-section line in the digital elevation model, to obtain the underwater terrain of the cross-section; The terrain reconstruction module includes: underwater terrain based on all cross-section lines, and reconstructs the three-dimensional underwater terrain of the river channel based on the natural neighborhood interpolation method.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the underwater three-dimensional terrain simulation method for rivers as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the underwater three-dimensional terrain simulation method for rivers as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the underwater three-dimensional terrain simulation method for rivers as described in any one of claims 1 to 6.