Method and device for generating digital terrain model, electronic equipment and storage medium

By using multi-model adaptive fitting and iterative parameter optimization, the accuracy and stability issues of traditional filtering methods in complex terrain environments are solved, generating a more realistic and robust high-precision digital terrain model that adapts to different terrain features.

CN121353580BActive Publication Date: 2026-03-03SHENZHEN XGRIDS-INNOVATION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511937152.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-03-03
Estimated Expiration
2045-12-22

AI Technical Summary

Technical Problem

When generating digital terrain models, existing technologies rely on fixed parameters for traditional filtering methods, which are difficult to adapt to complex and ever-changing terrain environments. This leads to missed ground points in flat areas or misclassification of non-ground points in steep slope areas, affecting the geometric fidelity of the DTM. Furthermore, the lack of understanding of the macroscopic morphology of the terrain results in unstable filtering results.

Method used

By using multi-model adaptive fitting, candidate ground points are determined using the best-fit model, and the filtering parameters are iteratively optimized. This includes rasterization of airborne lidar point cloud data, determination of water body masks, curve model fitting and interpolation, and adaptive adjustment of filtering parameters to generate a high-precision DTM.

Benefits of technology

It significantly improves the extraction accuracy of ground points under complex curved terrain, generates more realistic and robust high-precision digital terrain models, adapts to different terrain features, and improves the extraction accuracy of ground points and the stability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121353580B_ABST
    Figure CN121353580B_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, electronic device, and storage medium for generating digital terrain models (DTMs), including: processing multiple point cloud data to determine multiple grid cells and a final water mask; fitting at least two curve models to the point set within each grid cell and its neighborhood window, selecting the optimal model as the best-fit model for the neighborhood; determining initial candidate ground points within the neighborhood based on the best-fit model, and performing interpolation processing using multiple initial candidate ground points combined with the final water mask to generate an initial DTM; calculating the local maximum slope of each grid point within a larger local window, adaptively adjusting filtering parameters based on the local maximum slope, iteratively performing surface fitting and interpolation processing, and generating the optimal DTM after meeting the convergence condition. This method overcomes the limitations of fixed parameters in traditional filtering, significantly improving the accuracy of ground point extraction under complex curved terrain, and generating a more realistic and robust high-precision DTM.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of point cloud data processing technology, and in particular to methods, apparatus, electronic devices and storage media for generating digital terrain models. Background Technology

[0002] Digital Terrain Models (DTMs) are crucial foundational data in fields such as remote sensing, Geographic Information Systems (GIS), urban planning, disaster assessment, and ecological environment monitoring, used to accurately represent landforms. Currently, mainstream LiDAR point cloud filtering methods mainly include slope-based filtering, block minimization, surface fitting, and clustering segmentation. Among these, slope-based filtering algorithms are widely used due to their simplicity and high computational efficiency, such as the classic Progressive TINDensification (PTIN) and multi-scale morphological opening methods. However, these traditional methods generally suffer from the following drawbacks: 1. Reliance on fixed global parameters: Most algorithms use a uniform slope threshold or elevation difference threshold to determine whether a point belongs to the ground. This static setting is difficult to adapt to complex and varied terrain environments, especially in mixed landform areas (such as flat roads adjacent to steep slopes). This can easily lead to missed ground points in flat areas (under-filtering) and misclassified real terrain points as non-ground points in steep slope areas (over-filtering), severely affecting the geometric fidelity of the DTM. 2. Lack of understanding of macroscopic terrain morphology: Traditional methods mainly rely on local geometric relationships (such as elevation differences and angles) and do not fully integrate terrain factors (such as curvature and aspect variations) or semantic information (such as land use types). This makes it difficult to distinguish between real terrain undulations and pseudo-terrain changes caused by vegetation shading, resulting in unstable filtering results in transitional zones such as forest edges and building edges. Therefore, there is an urgent need to propose a method that can generate more realistic and reliable high-precision DTMs. Summary of the Invention

[0003] In view of this, the purpose of this application is to provide a method, apparatus, electronic device and storage medium for generating digital terrain models. By using multi-model adaptive fitting, determining candidate ground points using the best-fit model and iterative parameter optimization, it breaks through the limitations of fixed parameters in traditional filtering, significantly improves the ground point extraction accuracy under complex curved terrain (such as lawns and running tracks), and generates a more realistic and robust high-precision DTM.

[0004] This application provides a method for generating a digital terrain model, the method comprising:

[0005] Rasterization and water mask determination processes were performed on multiple point cloud data from the airborne lidar to determine multiple grid cells and the final water mask.

[0006] For each grid cell and the point set within its neighborhood window, at least two curve models are fitted simultaneously, and the optimal model is selected as the best fitting model for the corresponding neighborhood.

[0007] Based on the best-fit model, initial candidate ground points are determined in the corresponding neighborhood. Multiple initial candidate ground points are combined with the final water mask for interpolation to generate an initial digital terrain model.

[0008] Based on the initial digital terrain model, the local maximum slope of each grid point is calculated within a larger local window. The filtering parameters are adaptively adjusted according to the local maximum slope, and surface fitting and interpolation are iteratively performed based on the adjusted filtering parameters. After the convergence condition is met, the final digital terrain model is generated, and the final digital terrain model is optimized to generate the optimal digital terrain model.

[0009] In one possible implementation, the final water mask is determined through the following steps:

[0010] Large-area detection is performed on the rasterized point cloud data to identify the grid cells of null pixels, and the grid cells of multiple null pixels are determined as the initial water body mask.

[0011] For each null pixel's grid cell, a local digital terrain model is constructed using the lowest point of its surrounding non-null grid cells to determine the local slope and elevation variation coefficient at the grid point location of the null pixel.

[0012] If the local slope or the elevation variation coefficient is greater than the corresponding threshold, the grid cells of the null pixels are removed from the initial water mask to obtain the final water mask.

[0013] In one possible implementation, the step of simultaneously fitting at least two curve models for each grid cell and its neighborhood window, and selecting the optimal model as the best-fit model for the corresponding neighborhood, includes:

[0014] Based on the planar model and the low-order polynomial surface model, the point set in each grid cell and its neighborhood window is fitted to determine multiple fitting curve models for that neighborhood.

[0015] The goodness-of-fit index for each fitted curve model is determined based on the Akaike information criterion or the Bayesian information criterion.

[0016] The fitted curve model corresponding to the smallest goodness-of-fit index is taken as the best-fit model in the neighborhood.

[0017] In one possible implementation, determining the initial candidate ground points in the corresponding neighborhood based on the best-fit model includes:

[0018] For each grid point in the neighborhood, calculate the vertical distance between the actual elevation of the grid point and the predicted elevation of its corresponding projected position on the best-fit model;

[0019] If the vertical distance is less than the first preset threshold, then it is determined whether the horizontal distance between the grid point and the local lowest point is less than the second preset threshold, and whether the slope angle calculated based on the best-fit surface gradient is less than the third preset threshold.

[0020] If both are true, and the grid point and the local lowest point satisfy the connectivity condition, then the grid point is selected as the initial candidate ground point.

[0021] In one possible implementation, the step of generating an initial digital terrain model by interpolating multiple initial candidate ground points in conjunction with the final water mask includes:

[0022] In the inverse distance weighted interpolation process, the interpolated elevation of each grid cell is obtained by weighted summation of the elevation values ​​of the initial candidate ground points participating in the calculation in its neighborhood and their distances to that grid cell.

[0023] Within the interpolation search range, regions marked as invalid by the water body mask are excluded from the neighborhood search and weight calculation, and the initial digital terrain model is generated based on the interpolated elevation.

[0024] In one possible implementation, the adaptive adjustment of the filtering parameters based on the local maximum slope includes:

[0025] If the local maximum slope is greater than the fourth preset threshold, the first preset threshold is relaxed from the basic value to the extended value, while the second preset threshold is reduced and the third preset threshold is lowered to enhance the fault tolerance and local consistency control under steep terrain.

[0026] In one possible implementation, optimizing the final digital terrain model to generate an optimal digital terrain model includes:

[0027] The profile curvature and planar curvature of the final digital terrain model are determined;

[0028] Based on the profile curvature and planar curvature, the remaining grid points are finely judged, and the grid points that meet the supplementation conditions are supplemented as ground points;

[0029] Interpolate all the finally determined ground points to generate the optimal digital terrain model.

[0030] This application embodiment also provides a digital terrain model generation apparatus, the generation apparatus comprising:

[0031] The preprocessing module is used to perform rasterization processing and water mask determination processing on multiple point cloud data of airborne lidar, and to determine multiple grid cells and the final water mask.

[0032] The curve fitting module is used to simultaneously fit at least two curve models for each grid cell and the point set in its neighborhood window, and select the optimal model as the best fitting model for the corresponding neighborhood.

[0033] An interpolation module is used to determine initial candidate ground points in the corresponding neighborhood based on the best-fit model, and to perform interpolation processing using multiple initial candidate ground points in combination with the final water body mask to generate an initial digital terrain model.

[0034] The optimization module is used to calculate the local maximum slope of each grid point within a larger local window based on the initial digital terrain model, adaptively adjust the filtering parameters according to the local maximum slope, and iteratively perform surface fitting and interpolation processing based on the adjusted filtering parameters. After meeting the convergence condition, the final digital terrain model is generated, and the final digital terrain model is optimized to generate the optimal digital terrain model.

[0035] This application also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the digital terrain model generation method described above are performed.

[0036] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the digital terrain model generation method described above.

[0037] This application provides a method, apparatus, electronic device, and storage medium for generating digital terrain models. The generation method includes: performing rasterization processing on multiple point cloud data from an airborne lidar and water mask determination processing to determine multiple grid cells and a final water mask; simultaneously fitting at least two curve models to the point set within each grid cell and its neighborhood window, selecting the optimal model as the best fitting model for the corresponding neighborhood; determining initial candidate ground points within the corresponding neighborhood based on the best fitting model, and performing interpolation processing using multiple initial candidate ground points combined with the final water mask to generate an initial digital terrain model; calculating the local maximum slope of each grid point within a larger local window based on the initial digital terrain model, adaptively adjusting filtering parameters according to the local maximum slope, and iteratively performing surface fitting and interpolation processing based on the adjusted filtering parameters; generating a final digital terrain model after meeting the convergence condition; and optimizing the final digital terrain model to generate an optimal digital terrain model. By using multi-model adaptive fitting, determining candidate ground points using the best-fit model, and iterative parameter optimization, this method overcomes the limitations of fixed parameters in traditional filtering, significantly improving the accuracy of ground point extraction on complex curved terrains (such as lawns and running tracks), and generating a more realistic and robust high-precision DTM.

[0038] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0039] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 A flowchart illustrating a method for generating a digital terrain model provided in an embodiment of this application;

[0041] Figure 2 A schematic diagram illustrating a method for generating a digital terrain model provided in an embodiment of this application;

[0042] Figure 3 A schematic diagram of the structure of a digital terrain model generation device provided in an embodiment of this application;

[0043] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments 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, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.

[0045] First, the applicable scenarios for this application will be introduced. This application can be applied to the field of point cloud data processing technology.

[0046] Based on this, the embodiments of this application provide a method for generating a digital terrain model. By using multi-model adaptive fitting, determining candidate ground points using the best-fit model, and iterative parameter optimization, it breaks through the limitations of fixed parameters in traditional filtering, significantly improves the ground point extraction accuracy under complex curved terrain (such as lawns and running tracks), and generates a more realistic and robust high-precision DTM.

[0047] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for generating a digital terrain model, as provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the generation method includes:

[0048] S101: Perform rasterization and water mask determination on multiple point cloud data from the airborne lidar to determine multiple grid cells and the final water mask.

[0049] In this step, the acquired raw airborne lidar (LiDAR) 3D point cloud data is rasterized, transforming it from an unstructured discrete set of points into a regular spatial grid structure, thus determining multiple grid cells and the final water mask.

[0050] It should be noted that the lowest point of each grid cell is retained, and its original coordinates are recorded.

[0051] Here, the final water mask refers to a binary spatial region marker map used in remote sensing imagery or digital terrain processing to identify surface water areas (such as lakes, rivers, ponds, etc.). It is essentially a raster image or vector layer aligned with geographic coordinates.

[0052] In one possible implementation, the final water mask is determined through the following steps:

[0053] A: Perform large-area detection on the rasterized point cloud data to identify the grid cells of null pixels, and determine the grid cells of multiple null pixels as the initial water body mask.

[0054] Here, the initial water body area is identified and marked by detecting a large area of ​​null pixels, thus forming an initial water body mask.

[0055] B: For each null pixel's grid cell, a local digital terrain model is constructed using the lowest point of its surrounding non-null grid cells to determine the local slope and elevation variation coefficient at the grid point location of the null pixel.

[0056] Here, for each null pixel's grid cell, a local digital terrain model is constructed using the lowest point of its surrounding non-null grid cells to determine the local slope and elevation variation coefficient at the grid point location of the null pixel.

[0057] The local slope at the grid point location of null pixels is determined by the following formula. :

[0058]

[0059] in, This represents the height value at the grid point. The coordinates of the grid points, Let z be the rate of change of elevation z in the x-direction. Let z be the rate of change of elevation z in the y direction.

[0060] Here, the elevation variation coefficient at the grid point location of null pixels is determined using the following formula:

[0061]

[0062] in, This represents the average elevation of non-empty points within a w×w moving window centered on the current cell. This represents the standard deviation of the elevation of non-empty points within a w×w moving window centered on the current cell.

[0063] C: If the local slope or the elevation variation coefficient is greater than the corresponding threshold, the grid cells of the null pixels are removed from the initial water mask to obtain the final water mask.

[0064] Here, if the local slope is greater than 5 If the elevation variation coefficient is greater than 0.1, then the grid cells of the null pixels are removed from the initial water mask to obtain the final water mask.

[0065] The generation of the final water mask further includes the steps of dynamically adjusting the moving window size and the null area threshold based on landscape type information: obtaining the landscape type label of the region, which is obtained by fusing auxiliary geographic data sources or a lightweight scene classifier based on point clouds; dynamically configuring the following parameters according to different landscape type labels: moving window size: setting a smaller window in urban built-up areas to preserve detailed structures, and setting a larger smooth window in open water areas; null area threshold: lowering the threshold in densely built areas to identify small ponds, and raising the threshold in natural areas to suppress noise interference; rescanning the rasterized point cloud data with the adjusted parameters, detecting continuous null areas that meet the new conditions, and generating the final water mask by combining multi-scale terrain feature constraints.

[0066] S102: For each grid cell and the point set within its neighborhood window, simultaneously perform fitting of at least two curve models, and select the optimal model as the best fitting model for the corresponding neighborhood.

[0067] In this step, for each grid cell and the point set in its neighborhood window, at least two curve models are fitted simultaneously, and the optimal model is selected as the best fitting model for the corresponding neighborhood.

[0068] It should be noted that at least two types of curve models include planar models and other models such as low-order polynomial surface models.

[0069] Here, the set of points within the neighborhood window refers to a local spatial range (i.e., the neighborhood window) centered on the current grid cell (i.e., the target grid), which contains all valid grid points (usually the lowest point that has been preserved).

[0070] In one possible implementation, the step of simultaneously fitting at least two curve models for each grid cell and its neighborhood window, and selecting the optimal model as the best-fit model for the corresponding neighborhood, includes:

[0071] (1): Based on the planar model and the low-order polynomial surface model, the point set in each grid cell and its neighborhood window is fitted to determine multiple fitting curve models of the neighborhood.

[0072] Here, the planar model is represented by a planar equation in three-dimensional space: ax + by + cz + d = 0. By minimizing the sum of squared residuals between the actual elevation and the predicted elevation, the coefficients a, b, and c are solved to obtain the best planar fitting result in this neighborhood.

[0073] Among them, the low-order polynomial surface model: as a modeling method for non-planar but smooth terrain, the bivariate quadratic polynomial surface model is preferred, and its general form is: z = ax² + bxy + cy² + dx + ey + f Similarly, by estimating the parameters a, b, and c using the least squares method, the approximation of the complex surface morphology of this local region can be achieved.

[0074] (2): Determine the goodness-of-fit index for each fitted curve model based on the Akaike information criterion or the Bayesian information criterion. The fitted curve model corresponding to the smallest goodness-of-fit index is taken as the best-fit model in the neighborhood.

[0075] Here, the goodness-of-fit index for each fitted curve model is determined according to the Akaike information criterion or the Bayesian information criterion.

[0076] Among them, the goodness-of-fit index is either the Akaike Information Criterion (AIC) or the Bayesian Information Criterion (BIC), and their calculation formulas are respectively: AIC=2k+n·ln(RMSE); BIC=k·ln(n)+n·ln(RMSE), where k is the number of model parameters, n is the number of points involved in the fitting, and RMSE is the root mean square error. The model with the smallest AIC value or BIC value is selected as the best-fit model.

[0077] This application introduces a multi-model fitting mechanism (including planar and low-order polynomial surfaces) and combines AIC / BIC information criteria to select the optimal model, enabling adaptive identification of regional terrain features. A planar model is used on flat, hard surfaces (such as roads), while a quadratic surface model is automatically switched to on undulating, soft surfaces (such as lawns and sports tracks). This effectively overcomes the problems of excessive root mean square error and missed ground point detection caused by the forced use of planar fitting in traditional filtering algorithms, significantly improving the accuracy of ground point extraction in non-planar but continuous terrain areas.

[0078] S103: Based on the best-fit model, determine the initial candidate ground points in the corresponding neighborhood, and use multiple initial candidate ground points in combination with the final water mask for interpolation processing to generate an initial digital terrain model.

[0079] In this step, the best-fit model is used to determine the initial candidate ground points in the corresponding neighborhood. Multiple initial candidate ground points are combined with the final water body mask for interpolation to generate the initial digital terrain model.

[0080] In one possible implementation, determining the initial candidate ground points in the corresponding neighborhood based on the best-fit model includes:

[0081] I: For each grid point in the neighborhood, calculate the vertical distance between the actual elevation of the grid point and the predicted elevation of its corresponding projected position on the best-fit model.

[0082] Here, for each grid point within the current neighborhood window, the vertical distance (i.e., the residual) between the actual elevation of that point and the predicted elevation of its corresponding projected position on the best-fit surface model is calculated. The predicted elevation is the theoretical elevation value calculated at the coordinates based on the optimal model (plane or bivariate quadratic surface) selected for that neighborhood. This vertical distance reflects the true deviation of the point from the locally optimal terrain surface, and compared to traditional point-to-plane distances or global elevation thresholds, it more accurately characterizes the local consistency between the point and the terrain.

[0083] II: If the vertical distance is less than a first preset threshold, then determine whether the horizontal distance between the grid point and the local lowest point is less than a second preset threshold, and whether the slope angle calculated based on the best-fit surface gradient is less than a third preset threshold. If both are true, and the grid point and the local lowest point satisfy the connectivity condition, then the grid point is selected as the initial candidate ground point.

[0084] Here, it is determined whether the vertical distance is less than a first preset threshold (e.g., 0.15m). If not, the point is initially considered to be a non-ground point (such as vegetation, building edges, etc.) and is excluded; if so, the next step of connectivity test is performed.

[0085] The connectivity check includes: 1. Horizontal distance constraint: Determining whether the Euclidean horizontal distance between the grid point and the local lowest point in the current neighborhood is less than a second preset threshold (e.g., 3m). The local lowest point refers to the point with the smallest elevation among all valid points in the neighborhood window, and is usually considered a potential real ground reference point. This condition is used to limit the spatial expansion range of ground points and prevent false connections across terrain boundaries. 2. Slope angle constraint: Based on the gradient information of the best-fit surface model, calculating the local slope angle at the point location and determining whether it is less than a third preset threshold (e.g., 8°). Only when all three conditions are met simultaneously will the grid point be used as the initial candidate ground point.

[0086] In one possible implementation, the step of generating an initial digital terrain model by interpolating multiple initial candidate ground points in conjunction with the final water mask includes:

[0087] In the inverse distance weighted interpolation process, the interpolated elevation of each grid cell is obtained by weighted summation of the elevation values ​​of the initial candidate ground points participating in the calculation in its neighborhood and their distances to the grid cell. Within the interpolation search range, areas marked as invalid by the water mask are excluded from the neighborhood search and weight calculation, and the initial digital terrain model is generated based on the interpolated elevation.

[0088] Here, for each grid cell (e.g., with a resolution of 1m×1m), if it does not contain any valid points or needs to fill empty areas, the elevation value of the grid is estimated by searching for neighboring initial candidate ground points within its preset interpolation search range. Assuming there are n valid initial candidate ground points participating in the calculation within this search range, the interpolated elevation of the grid cell is determined according to the inverse distance weighted interpolation principle.

[0089] In the neighborhood search and weight calculation process described above, a final water body mask is introduced as a spatial constraint. This water body mask marks invalid regions identified as water surfaces (such as lakes, rivers, ponds, etc.). During interpolation, any initial candidate ground point located within an area marked as "invalid" by the water body mask is excluded from the neighborhood search and weight calculation of the current target grid cell; simultaneously, data propagation across water body boundaries is prohibited during the interpolation process. Specific implementation methods for this mechanism include: pre-excluding all grids marked as water bodies by the final water body mask when constructing the search neighborhood; or performing a validity check on candidate points before calculating weights, removing those whose geographical location falls within the water body mask range from the set of points participating in the interpolation.

[0090] Here, this processing strategy effectively avoids erroneous interpolation caused by missing point clouds or abnormal reflections in the water surface area (such as smoothly extending the shore highlands to the center of the water surface), preventing the generation of "false land" or "terrain uplift" that does not conform to the real landform, thereby ensuring the geometric rationality and physical authenticity of the generated terrain model around the water area.

[0091] S104: Based on the initial digital terrain model, calculate the local maximum slope of each grid point within a larger local window, adaptively adjust the filtering parameters according to the local maximum slope, and iteratively perform surface fitting and interpolation processing based on the adjusted filtering parameters. After meeting the convergence condition, generate the final digital terrain model, and optimize the final digital terrain model to generate the optimal digital terrain model.

[0092] In this step, the local maximum slope of each grid point is calculated within a larger local window based on the initial digital terrain model. The filtering parameters are adaptively adjusted based on the local maximum slope, and surface fitting and interpolation are iteratively performed based on the adjusted filtering parameters. After the convergence condition is met, the final digital terrain model is generated, and the final digital terrain model is optimized to generate the optimal digital terrain model.

[0093] It should be noted that the larger local window is larger than the neighborhood window, and the convergence condition is that the number of iterations exceeds the preset number or the number of newly added ground points is less than 50.

[0094] Here, the process traverses the entire region through a sliding window. For a grid point, it extracts a digital surface composed of all valid elevation points in its neighborhood, uses the finite difference method or surface fitting method to estimate the slope value in each direction, and takes the maximum value as the local maximum slope at that location.

[0095] The core processing steps S102 to S104 are re-executed using the updated filtering parameters, including: 1. performing multi-model surface fitting and optimal model selection on the neighborhood point set based on the new parameters; 2. re-determining candidate ground points based on the adjusted threshold; 3. using inverse distance weighted interpolation to obtain a new round of optimized DTM by combining water mask constraints.

[0096] In one possible implementation, the adaptive adjustment of the filtering parameters based on the local maximum slope includes:

[0097] If the local maximum slope is greater than the fourth preset threshold, the first preset threshold is relaxed from the basic value to the extended value, while the second preset threshold is reduced and the third preset threshold is lowered to enhance the fault tolerance and local consistency control under steep terrain.

[0098] Here, if the local maximum slope in a certain area exceeds the fourth preset threshold, it indicates that the terrain in that area is highly undulating, and traditional fixed thresholds are prone to causing missed detections of ground points. In this case, to enhance the inclusiveness of the filtering algorithm under steep terrain, the following parameters are automatically relaxed: the first preset threshold (residual threshold) is relaxed from the basic value (e.g., 0.15m) to a more lenient value (e.g., 0.3m); the second preset threshold (horizontal distance) is reduced from the original value (e.g., 3m) to a more stringent value (e.g., 2m) to control the spatial expansion range; the third preset threshold (slope angle threshold) is lowered from the original value (e.g., 8°) to a more conservative value (e.g., 6°) to prevent false connections across slopes. Conversely, if the local maximum slope is less than or equal to the fourth preset threshold, the original default parameters remain unchanged to ensure high-precision recognition capability in flat areas.

[0099] In this application, by constructing a "local maximum slope - filtering parameter" linkage mechanism, key parameters such as residual threshold, horizontal distance, and slope angle can be dynamically adjusted according to different terrain steepness. The judgment criteria are appropriately relaxed in steep slope areas to retain real ground points, while high sensitivity is maintained in flat areas to eliminate non-ground objects. This avoids misjudgment problems caused by fixed global parameters, enabling the algorithm to maintain excellent performance in heterogeneous terrain environments such as urban-natural mixed landscapes and mountain-plain transition zones.

[0100] In one possible implementation, optimizing the final digital terrain model to generate an optimal digital terrain model includes:

[0101] The profile curvature and planar curvature of the final digital terrain model are determined; the remaining grid points are refined based on the profile curvature and planar curvature, and the grid points that meet the supplementation conditions are supplemented as ground points; all the finally determined ground points are interpolated to generate the optimal digital terrain model.

[0102] Here, the profile curvature and planar curvature of the final digital terrain model are determined. The profile curvature and planar curvature are used to refine the remaining grid points that are still marked as "non-ground" (i.e., candidate points that have not been judged as ground points by the previous iteration process). Grid points that meet the supplementation conditions are supplemented as ground points. Interpolation is performed on all the finally determined ground points to generate the optimal digital terrain model.

[0103] For the remaining points located within a specific landform type area, the following supplementary judgment condition is applied: 1. If the area to which a certain grid cell belongs is determined to have negative profile curvature (e.g., <-0.1m) - ¹), and the slope is small (e.g., ≤10°), indicating that the area is a gently sloping concave terrain (e.g., lawn depression, sports field drainage strip, shallow ditch, etc.). Although such terrain is not absolutely flat, it is still part of the continuous ground; 2. At the same time, if there are one or more residual points at this location, the absolute value of the residual between the actual elevation and the predicted elevation of the corresponding location in the final DTM is less than the preset supplement threshold (e.g., ≤0.1m); 3. And the point has reasonable spatial continuity with the surrounding confirmed ground points (e.g., no obvious height change or occlusion evidence); then it is determined that the residual point is very likely to be a missed ground point caused by sparse vegetation occlusion, uneven point cloud sampling, or overly strict previous filtering, and should be supplemented and identified as a ground point.

[0104] In this application, by introducing a joint analysis mechanism of profile curvature and planar curvature, a deep judgment leap from "geometric proximity" to "morphological consistency" is achieved, breaking through the limitation of traditional filtering methods that only rely on distance and angle thresholds. This enables the algorithm to have a certain "terrain understanding" ability, significantly improving its applicability and output quality in heterogeneous terrain environments.

[0105] For further details, please refer to Figure 2 , Figure 2 This is a schematic diagram illustrating a method for generating a digital terrain model provided in an embodiment of this application. Figure 2 As shown, multiple point cloud data from the rasterized airborne lidar are used to obtain grid cells and the final water mask. Based on the grid cells, multi-model surface fitting and best-fit model selection are performed. Based on the best-fit model, initial candidate ground points in the corresponding neighborhood are determined. Iterative DTM generation and parameter adaptive update are performed. After the convergence condition is met, the final DTM is generated. Finally, the final digital terrain model is optimized to generate the optimal DTM.

[0106] This application provides a method for generating a digital terrain model, comprising: rasterizing multiple point cloud data from an airborne lidar and determining a water mask to identify multiple grid cells and a final water mask; simultaneously fitting at least two curve models to the point set within each grid cell and its neighborhood window, selecting the optimal model as the best-fit model for the corresponding neighborhood; determining initial candidate ground points within the corresponding neighborhood based on the best-fit model, and performing interpolation processing using multiple initial candidate ground points combined with the final water mask to generate an initial digital terrain model; calculating the local maximum slope of each grid point within a larger local window based on the initial digital terrain model, adaptively adjusting filtering parameters according to the local maximum slope, and iteratively performing surface fitting and interpolation processing based on the adjusted filtering parameters; generating a final digital terrain model after meeting the convergence condition; and optimizing the final digital terrain model to generate an optimal digital terrain model. By using multi-model adaptive fitting, determining candidate ground points using the best-fit model, and iterative parameter optimization, this method overcomes the limitations of fixed parameters in traditional filtering, significantly improving the accuracy of ground point extraction on complex curved terrains (such as lawns and running tracks), and generating a more realistic and robust high-precision DTM.

[0107] Please see Figure 3 , Figure 3 This is a schematic diagram of a digital terrain model generation device provided in an embodiment of this application. Figure 3 As shown, the digital terrain model generation device 300 includes:

[0108] The preprocessing module 310 is used to perform rasterization processing and water mask determination processing on multiple point cloud data of the airborne lidar, and to determine multiple grid cells and the final water mask.

[0109] The curve fitting module 320 is used to simultaneously fit at least two curve models for each grid cell and the point set in its neighborhood window, and select the optimal model as the best fitting model for the corresponding neighborhood.

[0110] Interpolation module 330 is used to determine initial candidate ground points in the corresponding neighborhood based on the best fitting model, and to perform interpolation processing using multiple initial candidate ground points in combination with the final water body mask to generate an initial digital terrain model.

[0111] The optimization module 340 is used to calculate the local maximum slope of each grid point within a larger local window based on the initial digital terrain model, adaptively adjust the filtering parameters according to the local maximum slope, and iteratively perform surface fitting and interpolation processing based on the adjusted filtering parameters. After meeting the convergence condition, the final digital terrain model is generated, and the final digital terrain model is optimized to generate the optimal digital terrain model.

[0112] Furthermore, the pretreatment module 310 determines the final water mask through the following steps:

[0113] Large-area detection is performed on the rasterized point cloud data to identify the grid cells of null pixels, and the grid cells of multiple null pixels are determined as the initial water body mask.

[0114] For each null pixel's grid cell, a local digital terrain model is constructed using the lowest point of its surrounding non-null grid cells to determine the local slope and elevation variation coefficient at the grid point location of the null pixel.

[0115] If the local slope or the elevation variation coefficient is greater than the corresponding threshold, the grid cells of the null pixels are removed from the initial water mask to obtain the final water mask.

[0116] Furthermore, the curve fitting module 320 is used to simultaneously fit at least two curve models for each grid cell and its neighborhood window, selecting the optimal model as the best fitting model for the corresponding neighborhood:

[0117] Based on the planar model and the low-order polynomial surface model, the point set in each grid cell and its neighborhood window is fitted to determine multiple fitting curve models for that neighborhood.

[0118] The goodness-of-fit index for each fitted curve model is determined based on the Akaike information criterion or the Bayesian information criterion.

[0119] The fitted curve model corresponding to the smallest goodness-of-fit index is taken as the best-fit model in the neighborhood.

[0120] Furthermore, the interpolation module 330 is used to determine the initial candidate ground points in the corresponding neighborhood based on the best-fit model:

[0121] For each grid point in the neighborhood, calculate the vertical distance between the actual elevation of the grid point and the predicted elevation of its corresponding projected position on the best-fit model;

[0122] If the vertical distance is less than the first preset threshold, then it is determined whether the horizontal distance between the grid point and the local lowest point is less than the second preset threshold, and whether the slope angle calculated based on the best-fit surface gradient is less than the third preset threshold.

[0123] If both are true, and the grid point and the local lowest point satisfy the connectivity condition, then the grid point is selected as the initial candidate ground point.

[0124] Furthermore, the interpolation module 330 is used to perform interpolation processing using multiple initial candidate ground points and the final water mask to generate an initial digital terrain model:

[0125] In the inverse distance weighted interpolation process, the interpolated elevation of each grid cell is obtained by weighted summation of the elevation values ​​of the initial candidate ground points participating in the calculation in its neighborhood and their distances to that grid cell.

[0126] Within the interpolation search range, regions marked as invalid by the water body mask are excluded from the neighborhood search and weight calculation, and the initial digital terrain model is generated based on the interpolated elevation.

[0127] Furthermore, the optimization module 340 is used to adaptively adjust the filtering parameters based on the local maximum slope:

[0128] If the local maximum slope is greater than the fourth preset threshold, the first preset threshold is relaxed from the basic value to the extended value, while the second preset threshold is reduced and the third preset threshold is lowered to enhance the fault tolerance and local consistency control under steep terrain.

[0129] Furthermore, the optimization module 340 is used to optimize the final digital terrain model to generate an optimal digital terrain model, including:

[0130] The profile curvature and planar curvature of the final digital terrain model are determined;

[0131] Based on the profile curvature and planar curvature, the remaining grid points are finely judged, and the grid points that meet the supplementation conditions are supplemented as ground points;

[0132] Interpolate all the finally determined ground points to generate the optimal digital terrain model.

[0133] This application provides a digital terrain model generation apparatus, comprising: a preprocessing module for rasterizing multiple point cloud data from an airborne lidar and determining a water mask, thereby determining multiple grid cells and a final water mask; a curve fitting module for simultaneously fitting at least two curve models to a set of points within each grid cell and its neighborhood window, selecting the optimal model as the best-fit model for the corresponding neighborhood; an interpolation module for determining initial candidate ground points within the corresponding neighborhood based on the best-fit model, performing interpolation processing using multiple initial candidate ground points combined with the final water mask to generate an initial digital terrain model; and an optimization module for calculating the local maximum slope of each grid point within a larger local window based on the initial digital terrain model, adaptively adjusting filtering parameters according to the local maximum slope, iteratively performing surface fitting and interpolation processing based on the adjusted filtering parameters, generating a final digital terrain model after meeting convergence conditions, and optimizing the final digital terrain model to generate an optimal digital terrain model. By using multi-model adaptive fitting, determining candidate ground points using the best-fit model, and iterative parameter optimization, this method overcomes the limitations of fixed parameters in traditional filtering, significantly improving the accuracy of ground point extraction on complex curved terrains (such as lawns and running tracks), and generating a more realistic and robust high-precision DTM.

[0134] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 400 includes a processor 410, a memory 420, and a bus 430.

[0135] The memory 420 stores machine-readable instructions executable by the processor 410. When the electronic device 400 is running, the processor 410 communicates with the memory 420 via the bus 430. When the machine-readable instructions are executed by the processor 410, they can perform the operations described above. Figure 1 as well as Figure 2 The steps of the digital terrain model generation method in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.

[0136] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can perform the above-described actions. Figure 1 as well as Figure 2 The steps of the digital terrain model generation method in the method embodiment shown are described in detail in the method embodiment, and will not be repeated here.

[0137] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0139] 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0140] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0141] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, 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 portion 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.

[0142] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, 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, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for generating a digital terrain model, characterized in that, The generation method includes: Rasterization and water mask determination processes were performed on multiple point cloud data from the airborne lidar to determine multiple grid cells and the final water mask. For each grid cell and the point set within its neighborhood window, at least two curve models are fitted simultaneously, and the optimal model is selected as the best fitting model for the corresponding neighborhood. Based on the best-fit model, initial candidate ground points are determined in the corresponding neighborhood. Multiple initial candidate ground points are combined with the final water mask for interpolation to generate an initial digital terrain model. Based on the initial digital terrain model, the local maximum slope of each grid point is calculated within a larger local window. The filtering parameters are adaptively adjusted according to the local maximum slope, and surface fitting and interpolation are iteratively performed based on the adjusted filtering parameters. After the convergence condition is met, the final digital terrain model is generated, and the final digital terrain model is optimized to generate the optimal digital terrain model. The final water mask is determined through the following steps: Large-area detection is performed on the rasterized point cloud data to identify the grid cells of null pixels, and the grid cells of multiple null pixels are determined as the initial water body mask. For each null pixel's grid cell, a local digital terrain model is constructed using the lowest point of its surrounding non-null grid cells to determine the local slope and elevation variation coefficient at the grid point location of the null pixel. If the local slope or the elevation variation coefficient is greater than the corresponding threshold, the grid cells of the null pixels are removed from the initial water mask to obtain the final water mask. The process of determining the initial candidate ground points in the corresponding neighborhood based on the best-fit model includes: For each grid point in the neighborhood, calculate the vertical distance between the actual elevation of the grid point and the predicted elevation of its corresponding projected position on the best-fit model; If the vertical distance is less than the first preset threshold, then it is determined whether the horizontal distance between the grid point and the local lowest point is less than the second preset threshold, and whether the slope angle calculated based on the best-fit surface gradient is less than the third preset threshold. If both are true, and the grid point and the local lowest point satisfy the connectivity condition, then the grid point is selected as the initial candidate ground point.

2. The generation method according to claim 1, characterized in that, The process of simultaneously fitting at least two curve models to the point set within each grid cell and its neighborhood window, and selecting the optimal model as the best fitting model for the corresponding neighborhood, includes: Based on the planar model and the low-order polynomial surface model, the point set in each grid cell and its neighborhood window is fitted to determine multiple fitting curve models for that neighborhood. The goodness-of-fit index for each fitted curve model is determined based on the Akaike information criterion or the Bayesian information criterion. The fitted curve model corresponding to the smallest goodness-of-fit index is taken as the best-fit model in the neighborhood.

3. The generation method according to claim 1, characterized in that, The process of determining the initial candidate ground points in the corresponding neighborhood based on the best-fit model includes: For each grid point in the neighborhood, calculate the vertical distance between the actual elevation of the grid point and the predicted elevation of its corresponding projected position on the best-fit model; If the vertical distance is less than the first preset threshold, then it is determined whether the horizontal distance between the grid point and the local lowest point is less than the second preset threshold, and whether the slope angle calculated based on the best-fit surface gradient is less than the third preset threshold. If both are true, and the grid point and the local lowest point satisfy the connectivity condition, then the grid point is selected as the initial candidate ground point.

4. The generation method according to claim 1, characterized in that, The adaptive adjustment of filtering parameters based on the local maximum slope includes: If the local maximum slope is greater than the fourth preset threshold, the first preset threshold is relaxed from the basic value to the extended value, while the second preset threshold is reduced and the third preset threshold is lowered to enhance the fault tolerance and local consistency control under steep terrain.

5. The generation method according to claim 1, characterized in that, The step of optimizing the final digital terrain model to generate the optimal digital terrain model includes: The profile curvature and planar curvature of the final digital terrain model are determined; Based on the profile curvature and planar curvature, the remaining grid points are finely judged, and the grid points that meet the supplementation conditions are supplemented as ground points; Interpolate all the finally determined ground points to generate the optimal digital terrain model.

6. A digital terrain model generation apparatus, characterized in that, The generating apparatus includes: The preprocessing module is used to perform rasterization processing and water mask determination processing on multiple point cloud data of airborne lidar, and to determine multiple grid cells and the final water mask. The curve fitting module is used to simultaneously fit at least two curve models for each grid cell and the point set in its neighborhood window, and select the optimal model as the best fitting model for the corresponding neighborhood. An interpolation module is used to determine initial candidate ground points in the corresponding neighborhood based on the best-fit model, and to perform interpolation processing using multiple initial candidate ground points in combination with the final water body mask to generate an initial digital terrain model. The optimization module is used to calculate the local maximum slope of each grid point within a larger local window based on the initial digital terrain model, adaptively adjust the filtering parameters according to the local maximum slope, and iteratively perform surface fitting and interpolation processing based on the adjusted filtering parameters. After meeting the convergence condition, the final digital terrain model is generated, and the final digital terrain model is optimized to generate the optimal digital terrain model. The pretreatment module determines the final water mask through the following steps: Large-area detection is performed on the rasterized point cloud data to identify the grid cells of null pixels, and the grid cells of multiple null pixels are determined as the initial water body mask. For each null pixel's grid cell, a local digital terrain model is constructed using the lowest point of its surrounding non-null grid cells to determine the local slope and elevation variation coefficient at the grid point location of the null pixel. If the local slope or the elevation variation coefficient is greater than the corresponding threshold, the grid cells of the null pixels are removed from the initial water mask to obtain the final water mask. The interpolation module is used to determine the initial candidate ground points in the corresponding neighborhood based on the best-fit model. For each grid point in the neighborhood, calculate the vertical distance between the actual elevation of the grid point and the predicted elevation of its corresponding projected position on the best-fit model; If the vertical distance is less than the first preset threshold, then it is determined whether the horizontal distance between the grid point and the local lowest point is less than the second preset threshold, and whether the slope angle calculated based on the best-fit surface gradient is less than the third preset threshold. If both are true, and the grid point and the local lowest point satisfy the connectivity condition, then the grid point is selected as the initial candidate ground point.

7. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the digital terrain model generation method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the method for generating a digital terrain model as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • SAR image mountain shadow dynamic threshold removing method based on inverse exponential function

    CN120259346A

  • Optical remote sensing image feature landslide information extraction method

    CN120747527A