CN-121053321-B - Interactive DEM smoothing method
Abstract
The invention relates to the technical field of topographic map mapping, in particular to an interactive DEM smoothing method, which comprises the following steps of S1, inputting original DEM data, S2, identifying abnormal values in the input original DEM data, S3, rendering marks on a two-dimensional topographic view in a highlighting mode on the identified abnormal values, superposing original contour map layers to obtain a superposed elevation map, setting a frame selection range, and carrying out elevation value correction on each elevation point in the frame selection range on the superposed elevation map to obtain corrected DEM data.
Inventors
- LU YUAN
- XU ZENAN
- Zhou Shuangbaihe
- ZHANG SHENG
- Ling Jiangyu
- Li Chanfu
- Xi Wenhuan
- DUAN QIAN
Assignees
- 广东水电二局集团有限公司
- 广东省建筑工程集团股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20250904
Claims (7)
- 1. An interactive DEM smoothing method, characterized by comprising the following steps; s1, inputting original DEM data; S2, identifying an abnormal value in the input original DEM data; S3, rendering marks on a two-dimensional topographic view in a highlighting mode on the identified outliers, superposing original contour map layers to obtain a superposed elevation map, setting a frame selection range for each outlier on the superposed elevation map, and carrying out elevation value correction on each elevation point in the frame selection range to obtain corrected DEM data, wherein the method specifically comprises the following steps: s31, setting frame selection ranges, wherein each abnormal value corresponds to one frame selection range; S32, obtaining corrected DEM data corresponding to each abnormal value by using a weighted smoothing iteration method, wherein the method specifically comprises the following steps of: S321, generating an initial two-dimensional matrix A by using all DEM data in a frame selection range, replacing background values of a non-target area with zero values, and then respectively conditioning zero value boundary layers at the leftmost side, the rightmost side, the uppermost side and the lowermost side of the initial two-dimensional matrix A to form an expansion matrix B, wherein the initial two-dimensional matrix A is a core area of the expansion matrix B; s322, performing space self-adaptive weighted smoothing calculation on the core area of the expansion matrix B, and calculating the number t of zero value grids in the four fields of each target grid; ; ; In the above-mentioned method, the step of, Representing the first of the expansion matrices B The elevation value of the row corresponding to the grid of the j-th column, Representing the ith row and the ith row in the expansion matrix B Elevation values corresponding to the grids of the columns, o represents upper, lower, left and right pixels of the center pixel; S323, dynamically adjusting the weight coefficient before and after each target grid is corrected according to the number t value calculated in the step S322 to obtain an elevation value after each grid is corrected, wherein the elevation value after each grid is specifically calculated by the following formula: ; In the above-mentioned method, the step of, Representing elevation values of the ith row and the jth column of the expansion matrix B after grid correction; representing a first weight; Representing a second weight; S324, iterating S322-S323, and performing N times of iteration to obtain correction values of all elevation points in the frame selection range and obtain corrected DEM data corresponding to the abnormal value; s33, carrying out S32 on each manual frame selection range to obtain corrected DEM data corresponding to all abnormal values.
- 2. An interactive DEM smoothing method as claimed in claim 1, wherein S2 comprises the steps of: s21, obtaining high-frequency residual data of original DEM data; S22, selecting the size of a sliding window, and traversing the high-frequency residual data in the selected sliding window to obtain a median MAD of absolute deviation of the high-frequency residual data in the sliding window; S23, judging whether the center pixel of each sliding window is an abnormal value or not based on the median MAD of the absolute deviation of the sliding window.
- 3. The interactive DEM smoothing method as claimed in claim 2, wherein in step S23, the MAD is multiplied by a constant factor to obtain an adjusted MAD, which is denoted as MAD ', then an absolute deviation between an elevation value of a center pixel of the sliding window and a median of the sliding window is calculated, which is denoted as d, a relation between d and k times MAD ' is compared, and when d is greater than k times MAD ', the center pixel in the sliding window is determined as an outlier.
- 4. An interactive DEM smoothing method as claimed in claim 2, wherein in step S22, the calculation of the sliding window is skipped when there are null values in the sliding window.
- 5. The interactive DEM smoothing method according to claim 2, wherein the specific method for obtaining the high-frequency residual data of the original DEM data in step S21 is to convert the original DEM data into a two-dimensional array, replace the background value therein with a null value, then perform a low-pass filtering operation on the converted two-dimensional array, and subtract the converted two-dimensional array from the two-dimensional array before conversion to obtain the high-frequency residual data.
- 6. An interactive DEM smoothing method according to claim 2, characterized in that in step S22, the values in the highest 10% range and the values in the lowest 10% range of the high frequency residual data in the sliding window are removed, the remaining values are calculated to obtain a truncated mean value, the dispersion is calculated from the truncated mean value and the quartile range value of the corresponding high frequency residual data, and the median MAD of the absolute deviation of the high frequency residual data in the sliding window is replaced by the dispersion.
- 7. The interactive DEM smoothing method according to claim 6, wherein in step S31, the frame selection range is set by training a U-Net neural network, inputting DEM data and outlier detection results, outputting binary masks, obtaining AI pre-segmentation results by using model loss functions and boundary constraint terms, and adding and deleting vertices of a selection area on the AI pre-segmentation results to obtain an outlier, wherein the outlier is the frame selection range.
Description
Interactive DEM smoothing method Technical Field The invention relates to the technical field of topographic map mapping, in particular to an interactive DEM smoothing method. Background In topographic map mapping, contour line drawing is a key technology, and has important significance for engineering construction, planning and design and topographic analysis. With the development of unmanned aerial vehicle technology, a processing method based on airborne Lidar data gradually becomes a research hotspot, how to produce a DEM (Digital Elevation Model ) which is high in precision and can reflect the topographic features, and generating contour lines according to the DEM becomes a key. However, the prior art still has a plurality of defects, and the requirements on precision, efficiency and adaptability in engineering practice are difficult to meet. The traditional contour line is manufactured by using theodolite, total station, actual measurement RTK and other equipment, and the three-dimensional coordinates of the characteristic points of the terrain such as mountain tops, valleys, ridges, gradient change points and the like are directly measured in the field. The method has low field actual measurement efficiency, can cause contour distortion due to missing of characteristic points, depends on experience of operators, has strong subjectivity, and is difficult to meet the requirements of modern contour manufacturing. With the introduction of airborne Lidar and unmanned aerial vehicle photogrammetry technologies, the DEM and the contour line manufacturing method based on point cloud data are widely applied. The method for manufacturing the DEM based on the airborne Lidar mainly separates ground points, vegetation points, building points and the like through point cloud filtering and point cloud classification, however, the problem of false leakage of the point cloud filtering and classification is caused by feature ambiguity, algorithm universality defects and data quality limitation through the point cloud filtering and the point cloud classification, when the elevation change of the short shrubs approximates to the overlapping of terrains and vegetation or building features of micro-terrain and the like, the algorithm cannot adapt to complex scenes, or the point cloud has shielding or noise, classification rules and filtering logic inevitably generate false judgment (the tall trees are mistaken for the ground) or omission (the ravines and vegetation residues) and the DEM manufactured by the point cloud data obtained by the airborne Lidar has abnormal elevation points due to the fact that the point cloud filtering and classification false leakage caused by own algorithm and terrain complexity. In engineering, a cross-sectional method and a filtering method are often used for eliminating abnormal elevation points, the cross-sectional method generates cross sections according to a certain interval by using a three-dimensional point cloud, whether the abnormal elevation points exist in the cross sections is checked one by one, and then a polygon is drawn for deletion. The method has the problems of misjudgment in a three-dimensional space, complex operation, low efficiency, subjective deviation and the like, and the filtering method has contradiction between terrain fidelity and noise elimination by integrally filtering the set parameters or logic of the whole DEM, and the processing result transmits errors. Therefore, it is desirable to provide an interactive DEM smoothing method, which improves the efficiency of DEM outlier correction compared to the prior art. Disclosure of Invention The invention solves the technical problems existing in the prior art, and provides an interactive DEM smoothing method. In order to achieve the above purpose, the technical scheme adopted by the invention is as follows: an interactive DEM smoothing method comprises the following steps of; s1, inputting original DEM data; S2, identifying an abnormal value in the input original DEM data; And S3, rendering marks on the two-dimensional topographic view in a highlighting mode on the identified outliers, superposing the original contour map layers to obtain a superposed elevation map, setting a frame selection range for each outlier on the superposed elevation map, and carrying out elevation value correction on each elevation point in the frame selection range to obtain corrected DEM data. 2. An interactive DEM smoothing method as claimed in claim 1, wherein S2 comprises the steps of: s21, obtaining high-frequency residual data of original DEM data; S22, selecting the size of a sliding window, and traversing the high-frequency residual data in the selected sliding window to obtain a median MAD of absolute deviation of the high-frequency residual data in the sliding window; S23, judging whether the center pixel of each sliding window is an abnormal value or not based on the median MAD of the absolute deviation of the sliding window.