Multi-scale topographic feature line adaptive extraction method for coupling multi-source topographic features
By constructing a multi-scale terrain feature line adaptive extraction model, deep learning is used to extract ridge lines and valley lines from high-resolution terrain data, solving the problems of insufficient accuracy and robustness in existing technologies, and achieving higher accuracy and robustness in terrain feature line extraction.
Patent Information
- Application Number
- CN202511391049.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-26
- Publication Date
- 2025-12-23
AI Technical Summary
Existing technologies for extracting ridgelines and valleylines from high-resolution terrain data suffer from insufficient accuracy and poor robustness, especially in complex terrain conditions where they are difficult to adapt to different resolutions and the fusion of multi-source terrain features.
By acquiring point cloud data, generating multi-dimensional raster data, performing data augmentation, extracting valley and ridge raster data, and constructing a multi-scale terrain feature line adaptive extraction model that couples multi-source terrain features, training it with deep learning, and finally extracting terrain feature lines from the high-resolution multi-scale terrain feature line dataset.
It improves the accuracy and robustness of terrain feature line extraction under high-resolution, multi-scale, and complex terrain conditions, and enhances the degree of automation.
Smart Images

Figure CN121190984A_ABST
Abstract
Description
Technical Field
[0001] This invention generally relates to the fields of image processing and geographic information analysis technology, and more specifically, to an adaptive extraction method for multi-scale terrain feature lines coupled with multi-source terrain features. Background Technology
[0002] Landforms exhibit spatial continuity, and their boundaries are often blurred, posing a significant challenge to the accurate division of landform units. Ridge lines and valley lines, as important linear topographic elements characterizing landform boundaries and morphological features, not only constitute the skeletal structure of the terrain but also hold great significance in fields such as topographic analysis, cartographic generalization, and hydrological analysis.
[0003] Existing methods for extracting ridgelines and valley lines based on Digital Elevation Models (DEMs) and topographic parameters (such as aspect and curvature) can be mainly categorized into six types: thresholding methods, hydrological analysis methods, descriptor operator methods, object-oriented image analysis (OBIA) methods, spatial context methods, and methods based on machine learning and deep learning. The first four types typically rely on preset parameters or geomorphological features and are suitable for low- to medium-resolution DEM data, but their effectiveness is limited when processing high-resolution and large-scale complex terrain. Spatial context methods have certain advantages in modeling the spatial relationships of topographic features in high-resolution DEMs, but they still have limitations in terms of automation and nonlinear modeling capabilities. Furthermore, while high-resolution topographic data can express geomorphic details more precisely, it also introduces more background noise and uncertainty, easily misidentifying small features such as rocks and gravel as ridgelines or valleys.
[0004] The existing models are mainly applied to low-to-medium resolution terrain data, and their potential for extracting ridge lines and valley lines in high-precision DEMs has not been fully explored. They cannot adapt to the extraction of terrain feature lines with different resolutions and multi-source terrain feature fusion, and their accuracy and robustness in extracting ridge lines and valley lines under complex terrain conditions are insufficient. Summary of the Invention
[0005] According to the present invention, an adaptive extraction scheme for multi-scale terrain feature lines coupled with multi-source terrain features is provided. This scheme can adapt to the extraction of terrain feature lines with different resolutions and multi-source terrain feature fusion, and can improve the extraction accuracy and robustness of ridge lines and valley lines under complex terrain conditions.
[0006] This invention provides an adaptive extraction method for multi-scale terrain feature lines coupled with multi-source terrain features, characterized by comprising: Acquire point cloud data, which includes data on hilly, mountainous, and plateau terrain types; Multi-dimensional raster data is obtained from the point cloud data. Valley line raster data and ridge line raster data are extracted from the multi-dimensional raster data. Then, data augmentation is performed on the multi-dimensional raster data, valley line raster data and ridge line raster data to obtain a multi-scale terrain feature line dataset. The multi-scale terrain feature line dataset is divided into a first multi-scale terrain feature line dataset and a second multi-scale terrain feature line dataset. Construct a multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features; based on the first multi-scale terrain feature line dataset, train the multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features using a terrain feature loss function to obtain the optimal multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features. The second multi-scale terrain feature line dataset is input into the multi-scale terrain feature line adaptive extraction model with optimal coupling of multi-source terrain features to obtain terrain feature lines.
[0007] Compared with the prior art, the present invention has the following beneficial technical effects: By using deep learning to extract terrain feature lines from high-resolution, multi-scale terrain feature line datasets, the accuracy, robustness, and automation of terrain feature line extraction under high-resolution, multi-scale, and complex terrain conditions can be improved.
[0008] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0009] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 A flowchart of a multi-scale adaptive extraction method for coupled multi-source terrain features according to an embodiment of the present invention is shown; Figure 2 A schematic diagram of a multi-scale terrain feature line adaptive extraction model that couples multi-source terrain features according to an embodiment of the present invention is shown. Figure 3 A schematic diagram of a DEM encoding module according to an embodiment of the present invention is shown; Figure 4 A schematic diagram of the SCA-RPM module according to an embodiment of the present invention is shown; Figure 5 A schematic diagram of a decoding module according to an embodiment of the present invention is shown. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0011] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0012] In this invention, a high-resolution, multi-scale terrain feature line dataset is obtained from LiDAR (Light Detection and Ranging) point cloud data. Then, an adaptive extraction model for multi-scale terrain feature lines, coupled with multi-source terrain features, is used to obtain the extraction results. This approach improves the accuracy and robustness of ridgeline and valley line extraction under complex terrain conditions.
[0013] Figure 1 A flowchart of the multi-scale terrain feature line adaptive extraction method coupled with multi-source terrain features according to an embodiment of the present invention is shown.
[0014] The method includes: S101. Obtain point cloud data, which includes data on hilly, mountainous, and plateau terrain types.
[0015] Specifically, point cloud data is The set of points, where L is the total number of points. For ground points Axial coordinates, For ground points Axial coordinates, This represents the elevation value.
[0016] In this embodiment, representative LiDAR point cloud data of hilly, mountainous, and plateau areas are acquired from the OpenTopography platform. This platform provides high-resolution 3D terrain data ranging from meter to sub-meter resolution and is widely used in geoscience research. Specifically: (1) Hilly terrain refers to terrain with relatively gentle undulations, with an elevation generally between 200 and 500 meters and a relatively small slope.
[0017] (2) Mountainous terrain refers to areas with an altitude generally higher than 500 meters, with large undulations and steep mountains.
[0018] (3) Plateau terrain refers to areas with an overall elevation of over 1,000 meters, relatively flat terrain, but with an elevation difference of over 500 meters.
[0019] S102. Obtain multi-dimensional raster data from the point cloud data, extract valley line raster data and ridge line raster data from the multi-dimensional raster data, and then perform data augmentation on the multi-dimensional raster data, valley line raster data and ridge line raster data to obtain a multi-scale terrain feature line dataset, and divide the multi-scale terrain feature line dataset into a first multi-scale terrain feature line dataset and a second multi-scale terrain feature line dataset.
[0020] In this embodiment, obtaining multi-dimensional raster data from the point cloud data includes: S201. The point cloud data is rasterized using the inverse distance weighted interpolation method to generate multi-scale DEM raster data.
[0021] Specifically, the point cloud data is divided into a regular raster grid according to the target resolution, and then the elevation value of the center point of each raster is calculated to obtain multi-scale DEM raster data: in, This is the elevation value, specifically the pixel value; Let this be the elevation value of the nth known point; For the nth known point to the interpolation point The Euclidean distance; 𝑝 is the weight exponent; This represents the number of neighboring points used in the interpolation calculation.
[0022] As some optional implementation methods of this embodiment, the weight index 𝑝 is set to 2; the sampling values are set to 1 and 4 to obtain multi-scale DEM (Digital Elevation Model) raster data with 1m and 4m resolutions.
[0023] S202. Slope raster data, aspect raster data, curvature raster data, mountain shadow raster data, and contour vector data are calculated from the multi-scale DEM raster data. The multi-scale DEM raster data, slope raster data, aspect raster data, curvature raster data, mountain shadow raster data, and contour vector data constitute multi-dimensional raster data.
[0024] Specifically, the calculation process for multi-dimensional raster data is as follows: (1) Slope raster data: in, This is slope raster data, including slope raster data with 1m and 4m resolutions; This refers to the elevation value; For ground points Axis direction coordinates; For ground points Axial coordinates.
[0025] (2) Aspect raster data: in, The data consists of slope aspect raster data, including slope aspect raster data with resolutions of 1m and 4m. Slope aspect represents the direction of maximum slope descent in the horizontal direction, which is determined based on the gradient direction, and the angle range is 0°–360°. This refers to the elevation value; For ground points Axis direction coordinates; For ground points Axial coordinates.
[0026] (3) Curvature raster data: in, The data consists of curvature raster data, including 1m and 4m resolution curvature raster data. The curvature includes both planar curvature and profile curvature. The curvature values can be used to identify the potential locations of ridgelines and valleys in the terrain. This refers to the elevation value; For ground points Axis direction coordinates; For ground points Axial coordinates.
[0027] (4) Mountain shadow raster data: For the generated 1m and 4m resolution DEM raster data, the mountain shadow generation tool in ArcGIS Spatial.Analyst module was used to generate 1m and 4m resolution mountain shadow raster data.
[0028] (5) Contour vector data: Using the “contour” tool in ArcGIS, high-density contour vector data is obtained by setting the contour interval to 0.5 meters to 1 meter.
[0029] This invention utilizes high-resolution, multi-scale DEMs to extract vector data of high-density contour lines, facilitating more precise and accurate data annotation. Ridge and valley lines are identified through multi-dimensional topographic factors. Since these factors are highly sensitive to morphological changes in ridge and valley lines, they enhance the geometric recognition accuracy of the topographic framework, thereby improving feature identification capabilities. Slope aspect and mountain shadow information reflect the orientation and illumination relationship of the mountain surface in space, revealing micro-topographic structures and aiding in determining the spatial orientation and topological relationships of ridges and valleys, thus improving spatial structure expressiveness. Topographic rasters at different resolutions can complement each other; 1m data preserves local details, while 4m data highlights the overall trend. Their combined use improves the robustness of ridge / valley extraction, reduces false boundaries caused by local undulations, and further suppresses noise interference through multi-scale joint analysis. Significant synergistic relationships exist among multi-dimensional topographic indicators. Utilizing these synergistic features for fusion analysis effectively extracts coherent and complete ridge and valley lines, avoiding breaks or shifts, thereby improving the accuracy and coherence of ridge / valley line extraction.
[0030] In this embodiment, extracting valley line raster data based on the multi-dimensional raster data includes: S301. Perform null value filling and depression filling on the multi-scale DEM raster data in sequence to obtain the filled DEM raster data.
[0031] In this embodiment, null filling of multi-scale DEM raster data is performed as follows: For regions where null values (NoData) still exist after inverse distance weighted interpolation, in order to ensure the continuity of multi-scale DEM raster data, a linear interpolation method based on TIN (Triangulated Irregular Network) is used to fill the null value regions, and the null-filled DEM raster data at 1m and 4m resolutions are output.
[0032] Specifically, the process of filling null values in multi-scale DEM raster data is as follows: (1) Based on the LiDAR ground point cloud data obtained by S101, a triangular irregular network (TIN) is generated by the Delaunay triangulation algorithm. In this way, it can be ensured that each point is only affected by the nearest neighbor point, and the generated triangles satisfy the empty circle property, avoiding long and thin triangles and improving the interpolation accuracy.
[0033] (2) For each null raster cell in the multi-scale DEM raster data Find the triangular cell to which the null point belongs in the TIN, and use the linear equation of the triangular plane to interpolate the null point. The plane equation is as follows: in, This refers to the elevation value; Null point Axis direction coordinates; Null point Axis direction coordinates; The first coefficient; The second coefficient; This is the third coefficient. It can be obtained by solving a system of linear equations using the coordinates and elevation values of the three vertices of the triangle.
[0034] In this embodiment, the multi-scale DEM raster data is filled with depressions to obtain filled DEM raster data. Specifically, this is achieved using the "Fill" tool in ArcGIS. Filling the depressions ensures that the multi-scale DEM raster data has a complete water flow path, eliminating the interference of local elevation anomalies on hydrological modeling.
[0035] S302. Perform hydrological analysis on the filled DEM raster data to obtain preliminary valley line vector data, including: (1) Use the “Flow Direction” tool in ArcGIS to calculate the water flow direction of each cell in the filled DEM raster data and generate a flow direction raster.
[0036] (2) Accumulate the upstream sink flow of each cell based on the flow direction raster using the “Flow Accumulation” tool in ArcGIS.
[0037] (3) Set the sink flow threshold conditions using the “Raster Calculator” tool in ArcGIS. Set the sink flow threshold to the optimal sink flow threshold obtained by the mean change point method. Filter out high sink flow paths (i.e. potential valley lines) using the optimal sink flow threshold and generate binary raster data.
[0038] Specifically, the criteria for determining the valley line is that the upstream runoff is less than the optimal flow threshold.
[0039] In this embodiment, the process of obtaining the optimal flow threshold using the mean-point method is as follows: 1) Statistically calculate the channel density under different runoff thresholds, calculate the total river network length and watershed area under different thresholds, and then fit the channel density (channel density = total river network length / watershed area) to obtain the relationship curve between channel density and runoff threshold.
[0040] 2) By analyzing the trend of the first derivative of the curve relating channel density and flow rate threshold, the threshold corresponding to the point where the curve changes most significantly (the point with the largest slope of the curve) is determined as the optimal flow rate threshold.
[0041] (4) Use the “Stream to Feature” tool to vectorize the binary raster data and output the vector data of the preliminary valley lines at 1m and 4m resolutions.
[0042] S303. Characteristic line interpretation rules are constructed using the mountain shadow raster data and the slope aspect raster data. Based on these rules, the preliminary valley line vector data is interpreted to obtain the valley line vector data requiring correction, which is then corrected. The corrected valley line vector data is then converted into valley line raster data corresponding to the multi-scale DEM raster data. The correction includes modification and supplementation, and the interpretation tools are ArcGIS's "Edit Tool" and ArcGIS's "Snapping Tool".
[0043] Specifically, the data that needs to be modified is: 1) Valley lines are not aligned with high-density contour lines, and the contour lines are curved into U-shaped openings with the valley line vector data facing upwards.
[0044] 2) Valley line vector data that does not pass through the point of curvature minimum.
[0045] 3) Valley line vector data that is inconsistent with the depressions and troughs shown by the mountain shadow auxiliary display.
[0046] Specifically, the data that needs to be supplemented is: 1) Valley line vector data where no valley line appears in an identifiable area of continuous slope aspect variation.
[0047] 2) Valley line vector data with obvious "U-shaped" closed or upward-opening local depression characteristics in the contour map.
[0048] 3) The distribution of curvature minima is continuous along a clear direction, but the original valley line does not cover the valley line vector data of curvature minima.
[0049] 4) Valley line vector data where the confluence path is broken, but the terrain of the preceding and following nodes is still at a low point.
[0050] In this embodiment, the valley line vector data that needs to be corrected is corrected (modified and supplemented), including: 1) Editing: Use ArcGIS's "Edit Tool" to begin editing and making changes: ① Determine the scope of modification: Select the polyline segment to be modified. Determine the specific coordinates of the polyline segment to be modified.
[0051] ② Coordinate point modification operation: Select the polyline point corresponding to the polyline segment to be modified, delete the corresponding polyline point to be modified, and then add a new correct polyline point.
[0052] ③ Line segment correction: For incorrect line segments Delete the corresponding polyline segment directly.
[0053] 2) Supplement: Use ArcGIS's "Edit Tool" to start editing and supplement. Add new polyline segments directly to the original valley line. The new polyline segments are formed by connecting the new polyline points.
[0054] (3) Convert the corrected valley line vector data into valley line raster data corresponding to the multi-scale DEM raster data.
[0055] In this embodiment, the "Feature to Raster" tool under "Conversion Tools" in ArcGIS software is used for conversion. Specifically, the cell size of the "Feature to Raster" tool is set to 1m and 4m, and the ProcessingExtent and Snap Raster are both set to the corresponding multi-scale DEM raster data in the environment settings to ensure that the generated raster data is completely consistent with the multi-scale DEM raster data in terms of spatial location, size, and raster alignment.
[0056] This invention improves and optimizes automatically extracted valley lines by introducing modification and supplementation operations, resulting in valley line vector data that better reflects real terrain features. Subsequently, the corrected valley line vector data is converted to raster format and precisely aligned with the original DEM in the ArcGIS environment in terms of spatial size, resolution, and projected coordinate system. This approach enhances the spatial continuity, morphological integrity, and multi-scale adaptability of the valley line data, making it suitable for large-scale terrain analysis tasks in complex terrain areas.
[0057] In this embodiment, extracting ridgeline raster data based on the multi-dimensional raster data includes: S401. Based on multi-scale DEM raster data, slope aspect raster data, and contour vector data, the initial ridgeline vector data is obtained.
[0058] As some optional implementation methods of this embodiment, the vector data of the ridgeline is labeled by overlaying aspect raster data with 50% transparency and contour vector data with 50% transparency based on multi-scale mountain shadow raster data with 1m and 4m resolution, thereby obtaining the initial ridgeline vector data.
[0059] S402. Construct feature line interpretation rules using the mountain shadow raster data and the slope aspect raster data. Interpret the preliminary ridgeline vector data according to the feature line interpretation rules to obtain the ridgeline vector data that needs to be corrected and correct it. Then, convert the corrected ridgeline vector data into ridgeline raster data corresponding to the multi-scale DEM raster data. The correction includes modification and supplementation. The interpretation tools are ArcGIS's "Edit Tool" and ArcGIS's "Snapping Tool".
[0060] Specifically, the data that needs to be modified is: 1) Ridgeline vector data that does not pass through the point of maximum curvature.
[0061] 2) Ridge line vector data that is inconsistent with the convex land and high trough displayed with the mountain shadow auxiliary display.
[0062] Specifically, the data that needs to be supplemented is: the distribution of curvature maxima is continuous along a clear direction, but the original ridgeline does not cover the valley line vector data of the curvature maxima.
[0063] In this embodiment, the ridgeline vector data that needs correction is corrected (modified and supplemented), including: 1) Editing: Use ArcGIS's "Edit Tool" to begin editing and making changes: ① Determine the scope of modification: Select the polyline segment to be modified. Determine the specific coordinates of the polyline segment to be modified.
[0064] ② Coordinate point modification operation: Select the polyline point corresponding to the polyline segment to be modified, delete the corresponding polyline point to be modified, and then add a new correct polyline point.
[0065] ③ Line segment correction: For incorrect line segments Delete the corresponding polyline segment directly.
[0066] 2) Supplement: Use ArcGIS's "Edit Tool" to start editing and supplement. Add new polyline segments directly to the original ridgeline. The new polyline segments are formed by connecting the new polyline points.
[0067] (2) Convert the corrected ridgeline vector data into valley line raster data corresponding to the multi-scale DEM raster data. The specific steps are the same as those for valley lines.
[0068] By annotating ridgeline raster data through multi-dimensional raster data fusion and correction mechanisms, a technical system combining spatial accuracy and terrain adaptability has been formed. Based on the overlay annotation of multi-scale mountain shadow, aspect raster, and contour vector data at 1m and 4m resolutions, the spatial recognition capability of ridgelines can be enhanced by leveraging the complementarity of different data sources. Mountain shadows highlight the terrain's convex and concave features through lighting simulation, aspect raster uses directional gradients to assist in determining the ridgeline's direction, and contour vectors constrain the elevation continuity of ridgelines through elevation topological relationships. The 50% transparency overlay strategy avoids visual interference from single data sources and improves the reliability of annotation through cross-validation of multi-source information.
[0069] In this embodiment, the step of constructing feature line interpretation rules based on the mountain shadow raster data and the slope aspect raster data includes: S501. The mountain shadow raster data is overlaid as the bottom layer data and the slope aspect raster data is overlaid as the top layer data. A multi-category stretching color scheme is used to color the overlaid data and the transparency is set to obtain the slope aspect region data. Among them, the mountain shadow raster data is used to enhance the perception of terrain morphology, and the slope aspect raster data is used to identify areas of abrupt slope changes.
[0070] As some optional implementation methods of this embodiment, the multi-category stretching color scheme is as follows: 0°–360° is divided into 16 categories, and each category is assigned a different color level code in 16 directions; the transparency is set to 45%–55%.
[0071] S502. Based on the color distribution patterns of the slope aspect area data, construct feature line interpretation rules, including: valley lines correspond to lines connecting several low points in the gradually transitioning color gradation area of the slope aspect area data, where the low points refer to points with negative curvature raster data; ridge lines correspond to lines connecting several high points in the abrupt color gradation areas on both sides of the slope aspect area, where the high points refer to points with positive curvature raster data.
[0072] By constructing feature line interpretation rules, a deep integration of enhanced visualization and semantic analysis of terrain features is achieved, providing an intuitive and efficient interpretation system for the accurate identification of ridgelines and valleys. By overlaying mountain shadow raster data as the bottom layer and slope aspect raster data as the top layer, and employing a multi-category stretching color scheme and transparency settings, this data visualization strategy significantly improves the efficiency of terrain morphology recognition. Mountain shadows enhance the three-dimensionality of the terrain by simulating lighting effects, making the ridge-like protrusions of the terrain along the ridgeline more easily perceived. The slope aspect raster encodes different slope directions with 16 color levels, and the 45%-55% transparency setting preserves the terrain outline of the bottom layer of mountain shadows while avoiding visual occlusion of the top layer of slope aspect data. The composite visualization effect formed by the overlay of these two elements allows the interpreter to simultaneously obtain information on the three-dimensional shape and slope aspect distribution of the terrain. Based on the color distribution patterns of slope aspect data, a feature line interpretation rule was constructed, establishing a direct mapping relationship between visual features and terrain semantics. Regions with gradual color transitions correspond to gentle slope changes, and the lines connecting the low points accurately reflect the direction of the valley line. Conversely, regions with abrupt color changes on both sides indicate a sharp change in slope aspect, and the lines connecting the high points within these regions precisely correspond to the spatial location of the ridgeline. The refined division of 16 color levels improves the accuracy of slope aspect abrupt changes, enabling the capture of subtle slope aspect changes that are easily overlooked by traditional single-scale classification, thereby enhancing the accuracy of feature line interpretation.
[0073] In this embodiment, data augmentation is performed on the multi-dimensional raster data, valley line raster data, and ridge line raster data, including rotating the multi-dimensional raster data, ridge line raster data, and valley line raster data by 90°, 180°, and 270°, as well as horizontally and vertically flipping them.
[0074] Specifically, the multi-scale terrain feature line dataset includes both augmented and current data.
[0075] In this embodiment, the multi-scale terrain feature line dataset is divided into a first multi-scale terrain feature line dataset and a second multi-scale terrain feature line dataset. This includes: cropping the multi-scale DEM raster data according to regional division, and dividing the first multi-scale terrain feature line dataset and the second multi-scale terrain feature line dataset from each region according to a certain proportion, thereby maintaining the balance and representativeness of the sample distribution.
[0076] S103. Construct a multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features; based on the first multi-scale terrain feature line dataset, train the multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features using a terrain feature loss function to obtain the optimal multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features.
[0077] In this embodiment, as Figure 2 As shown, the multi-scale terrain feature line adaptive extraction model that couples multi-source terrain features includes: The DEM encoding module is used to encode the first multi-scale terrain feature line dataset to obtain multi-source features. The first multi-scale terrain feature line dataset includes multi-scale DEM raster data, slope raster data, aspect raster data, curvature raster data, and mountain shadow raster data.
[0078] In this embodiment, as Figure 3 As shown, the DEM encoding module includes, in sequence: a first convolution module, a downsampling module, and a convolution-self-attention collaborative module.
[0079] Specifically, the first convolution module includes: a convolution block (3×3), a batch normalization module, and a second ReLU activation module.
[0080] The convolution-self-attention collaborative module includes several groups of concatenated convolution-self-attention collaborative sub-modules. The first group of convolution-self-attention collaborative sub-modules uses the output data of the downsampling module as input data, while the other groups of convolution-self-attention collaborative sub-modules use the output data of the previous group of convolution-self-attention collaborative sub-modules as input data.
[0081] As some optional implementations of this embodiment, the convolution-self-attention collaborative module includes several sets of convolution-self-attention collaborative sub-modules connected in series, which may include 4-8 sets, preferably 4 sets.
[0082] In this embodiment, each group of convolutional-self-attention collaborative sub-modules includes: inputting input data into a first self-attention module to obtain enhanced features; inputting the enhanced features and the input data of the first self-attention module into a first residual connection module and adding them element-wise to obtain fused features; inputting the fused features into a second convolutional module and a third convolutional module in sequence, and then inputting the output of the third convolutional module and the fused features into a second residual connection module and adding them element-wise to obtain multi-source features.
[0083] Specifically, the first residual connection module enhances features and improves the stability of gradient backpropagation; the second and third convolution modules improve the model's ability to perceive edges and textures; and the second residual connection module achieves residual fusion of deep local features.
[0084] In this embodiment, the downsampling module includes several sets of downsampling sub-modules connected in series. The first set of downsampling sub-modules takes the output data of the first downsampling module as input, and the other sets of downsampling sub-modules take the output data of the previous set of downsampling sub-modules as input.
[0085] As some optional implementations of this embodiment, the downsampling module includes a group downsampling submodule, which may include 2-4 groups, preferably 2 groups.
[0086] Each downsampling submodule includes a first max-pooling layer and a fourth convolutional module. The max-pooling layer is used to reduce computation and enhance feature translation invariance while preserving significant terrain structure information; the convolutional module is used to extract local features (such as edges and textures) and gradually combine them into higher-level data.
[0087] The DEM encoding module efficiently extracts multi-scale features from multi-dimensional raster data, preserving detailed information while enhancing semantic understanding. Its lightweight design reduces the number of parameters, avoids overfitting, and improves computational efficiency.
[0088] In this embodiment, as Figure 4 As shown, the input data is fed into the first self-attention module to obtain enhanced features, including: S601. Input the input data of the first self-attention module into the fifth convolution module to obtain the query matrix. Key matrix Sum matrix .
[0089] In this embodiment, the query vector The calculation formula is: ; In this embodiment, the key vector The calculation formula is: ; In this embodiment, the value vector The calculation formula is: ; in, The center pixel value of the input data; It is the spatial location of each pixel, where The row coordinates for each pixel, The column coordinates for each pixel; This is the first convolution kernel; It is the second convolution kernel; This is the third convolution kernel. Specifically, , and Used to aggregate features within a 3x3 neighborhood to the center pixel. .
[0090] S602, By querying the matrix Bond matrix Semantic relevance is calculated by first calculating spatial proximity based on the input data of the first self-attention module, then fusing the semantic relevance and spatial proximity results, and finally combining the fused result with the value matrix. The features are then fused to obtain a weighted fusion feature.
[0091] In this embodiment, by querying the matrix Bond matrix Calculating semantic relevance includes: in, For semantic relevance, the value range is This is used to reflect the degree of semantic matching between feature points; For query vector; This is the key vector.
[0092] By query matrix Bond matrix To calculate semantic relevance, we can highlight the correlation between semantically similar regions in terrain features and suppress irrelevant noise.
[0093] In this embodiment, calculating spatial proximity based on the input data of the first self-attention module includes: calculating spatial proximity based on the input data of the first self-attention module includes: ; ; ; ; in, The normalized scaling factor in the vertical direction; This represents the number of downsampling attempts. For height; This is the horizontal normalized scaling factor; Width; The weighted Euclidean distance is squared. The row coordinates of the current center pixel; is the column coordinate of the current center pixel; u is the offset of the center pixel in the row direction within the neighborhood, where the neighborhood is a 3×3 region centered on the center pixel; The offset of the center pixel in the column direction within the neighborhood. The neighborhood is a 3×3 region centered on the center pixel; Spatial weighting factor; The total number of Gaussian kernels; A multi-scale Gaussian kernel number index; These are learnable weights used for weighted fusion of multi-scale Gaussian kernels; These are learnable scaling coefficients. Used to control the first The receptive field range of a multi-scale Gaussian kernel; This is a hyperparameter used to control whether a large receptive field is easily formed.
[0094] By constructing a spatial relative position matrix, introducing learnable scaling coefficients and multi-scale Gaussian kernels, and performing spatial proximity calculations, adaptive enhancement of attention guided by relative distance is achieved.
[0095] In this embodiment, the results of semantic relevance calculation and spatial proximity calculation are fused, and the fused result is compared with the value matrix. To integrate, including: (1) The results of semantic relevance calculation and spatial proximity calculation are fused, including: in, For dynamically adaptive convolutional kernels; Semantic relevance; For spatial proximity, The row coordinates for each pixel; The column coordinates for each pixel.
[0096] (2) Combine the result of (1) with the value matrix The fusion process yields weighted fusion features, including: in, For weighted fusion features; For the spatial location index of the traversal; The total number of all positions; For the first A position in the attention. Attention weights for position e; For position The corresponding value vector.
[0097] S603. The weighted fusion features are sequentially input into the sixth convolution module, the normalization module, and the first ReLU module to obtain the enhanced features.
[0098] The self-attention module effectively enhances the feature representation capability of images. This invention introduces a spatial relative position matrix and adaptively enhances it using a multi-scale Gaussian kernel and learnable scale coefficients. The fused features accurately capture semantic associations and spatial structure information in the image, thereby suppressing irrelevant noise, highlighting effective features, and improving the accuracy and efficiency of extracting ridgelines and valley lines.
[0099] In this embodiment, the multi-scale DEM raster data, slope raster data, aspect raster data, curvature raster data and mountain shadow raster data in the first multi-scale terrain feature line dataset are respectively input into their respective DEM encoders for encoding to obtain multi-source features.
[0100] (2) A multi-source feature fusion module, used to fuse the multi-source features to obtain multi-source fused features, including: 1) Multi-source terrain features are stitched together to obtain preliminary multi-source fusion features, including: in, Preliminary characteristics of multi-source fusion; To perform a stitching operation on multi-source terrain features along the channel dimension; Encoding results for multi-scale DEM raster data; Encoding results for mountain shadow raster data; The encoding result of curvature image data; The result of encoding the slope aspect raster data; This is the encoding result for slope aspect raster data.
[0101] 2) The preliminary fusion results Input the seventh convolutional module to extract the local spatial structure and obtain local multi-source fusion features.
[0102] 3) Input the local multi-source fusion features into the multi-source feature fusion module to obtain multi-source fusion features. The multi-source feature fusion module is used to enhance the long-distance dependency perception capability and global structure modeling capability of features.
[0103] (3) Decoding module, used to decode multi-source fusion features to obtain the prediction results of terrain feature lines, such as Figure 5 As shown, it includes: 1) The multi-source fusion features are first input into the feature restoration module.
[0104] In this embodiment, the feature restoration module includes multiple sets of cascaded feature restoration sub-modules. The first set of feature restoration sub-modules takes multi-source fused features as input, while the other sets of feature restoration sub-modules take the output data of the previous set of feature restoration sub-modules as input.
[0105] Each feature restoration module includes an eighth convolution module and a first upsampling module. The feature restoration module can increase the resolution of the feature map and gradually restore the spatial details of the terrain feature lines.
[0106] 2) Input the output of the feature restoration module into the ninth convolution module to generate pixel-by-pixel terrain feature line logical values.
[0107] 3) Input the data obtained in step 2) into the second upsampling module to enlarge the feature map resolution to the input size, and output the predicted results of the terrain feature lines, specifically as follows: Figure 2 As shown, the decoder outputs the predicted terrain feature lines of valley lines and ridge lines, where red represents ridge lines and blue represents valley lines.
[0108] In this embodiment, the terrain feature loss function includes: ; ; ; ; ; ; in, The loss function; The first weighting coefficient; This is the second weighting coefficient; This is the third weighting coefficient; for; for; for; Total number of pixels; The total number of categories; This is a category index, where the categories include background, ridgeline, and valleyline; Category weights; Predict the probability of the class for the model; is the focusing parameter, used to control the degree of attention given to difficult-to-classify samples; c is the pixel; For pixel c, it belongs to category The predicted probability; For pixels Category The true label; This is a smoothing term used to prevent division by zero; The weighting coefficients for the edge regions; for The total number of pixels in the edge region of the category; It is the set of pixel position indices of the edge region of category m; This represents the gradient magnitude. For the threshold; The true label image for category m; Use horizontal Sobel convolution kernels; It is a vertical Sobel convolution kernel.
[0109] Specifically, since the number of pixels for ridgelines and valley lines accounts for a relatively small percentage of the total number of pixels in the entire label, It is used to solve the class imbalance problem, enhance the model's attention to small objects such as ridge lines and valley lines, and reduce the excessive dominance of background pixels; It is used to optimize the shape of the predicted area and the real area to maintain consistency and reduce the problem of discontinuity in ridge lines and valley lines. This is used to improve the positioning accuracy of terrain line edges, solve the edge blurring problem caused by upsampling, and in While ensuring the integrity of the shape, refine the edge details of the ridgeline and valleyline.
[0110] This invention provides a multi-scale adaptive topographic feature line extraction model that couples multiple topographic features. This model effectively integrates multi-source topographic raster data, including DEM, slope, aspect, curvature, and mountain shadows. Through dynamic adaptive convolution kernel generation technology, it automatically adapts to the extraction needs of topographic features at different scales. This invention exhibits stronger feature extraction capabilities and anti-interference performance in complex terrain scenarios, especially showing better robustness to irregular terrain structures and noise interference. The model employs a lightweight design, achieving faster processing speed while maintaining high accuracy, providing a more efficient and accurate solution for topographic feature analysis. This invention overcomes the limitations of traditional topographic feature extraction methods, achieving efficient coupling of multi-source data and accurate capture of multi-scale features, improving the accuracy and robustness of ridgeline and valley line extraction under complex terrain conditions.
[0111] S104. Input the second multi-scale terrain feature line dataset into the multi-scale terrain feature line adaptive extraction model with optimal coupling of multi-source terrain features to obtain terrain feature lines.
[0112] According to embodiments of the present invention, the following advantages are available compared to the prior art: (1) Construct a multi-scale terrain feature line dataset to comprehensively acquire multi-source terrain feature information, improve feature expression capabilities, data augmentation, and multi-scale modeling, and enhance the model's generalization ability and stability. Compared with a single DEM data source, it fully integrates multiple feature dimensions, significantly enhancing the model's ability to express and distinguish complex terrains, and is suitable for diverse terrain areas such as hills, mountains, and plateaus. Various forms of data augmentation are performed on valley lines, ridge lines, and multi-dimensional terrain data to ensure the model's robustness and generalization ability in multi-scale scenarios, adapting to feature line extraction tasks under different resolutions and complex terrain conditions.
[0113] (2) Design a deep model structure that couples multiple source features to achieve efficient feature fusion and extraction, which can effectively extract terrain information of different scales and types. By combining the advantages of CNN and Transformer, the ability to model the semantics of terrain structure is improved, and the depth and breadth of feature expression are enhanced.
[0114] (3) This invention introduces a self-attention module (SCA-PRM) into the convolution-self-attention collaborative module (CNNFormer Block), and achieves fine modeling of spatial structure by integrating semantic relevance and spatial proximity calculation mechanism. The weighted Euclidean distance design and learnable multi-scale Gaussian kernel function make the spatial weight distribution more consistent with the terrain change characteristics, thereby enhancing the model's discrimination ability in feature boundary regions.
[0115] (4) Construct a terrain feature line loss function that integrates three types of losses to improve the accuracy of boundary recognition. A joint loss function including Focal Loss, Dice Loss and edge loss is proposed to effectively solve the problem of class imbalance and enhance the model's sensitivity to terrain feature line boundaries. The edge loss term calculates the edge region through image gradient, which improves the extraction accuracy of ridge and valley edge lines and makes the extraction results more consistent with reality.
[0116] (5) The present invention constructs a complete multi-scale feature line extraction system, which has highly automated and high-precision terrain feature line extraction.
[0117] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to the present invention.
[0118] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0119] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A multi-scale adaptive extraction method for terrain feature lines coupled with multi-source terrain features, characterized in that, include: Acquire point cloud data, which includes data on hilly, mountainous, and plateau terrain types; Multi-dimensional raster data is obtained from the point cloud data. Valley line raster data and ridge line raster data are extracted from the multi-dimensional raster data. Then, data augmentation is performed on the multi-dimensional raster data, valley line raster data and ridge line raster data to obtain a multi-scale terrain feature line dataset. The multi-scale terrain feature line dataset is divided into a first multi-scale terrain feature line dataset and a second multi-scale terrain feature line dataset. Construct a multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features; based on the first multi-scale terrain feature line dataset, train the multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features using a terrain feature loss function to obtain the optimal multi-scale adaptive extraction model of terrain feature lines coupled with multi-source terrain features. The second multi-scale terrain feature line dataset is input into the multi-scale terrain feature line adaptive extraction model with optimal coupling of multi-source terrain features to obtain terrain feature lines.
2. The method according to claim 1, characterized in that, The process of obtaining multi-dimensional raster data from the point cloud data includes: The point cloud data is rasterized using inverse distance weighted interpolation to generate multi-scale DEM raster data. The slope raster data, aspect raster data, curvature raster data, mountain shadow raster data, and contour vector data are calculated from the multi-scale DEM raster data. The multi-scale DEM raster data, slope raster data, aspect raster data, curvature raster data, mountain shadow raster data, and contour vector data constitute multi-dimensional raster data.
3. The method according to claim 2, characterized in that, Valley line raster data is extracted from the multi-dimensional raster data, including: The multi-scale DEM raster data is sequentially filled with null values and depressions to obtain the filled DEM raster data. Hydrological analysis was performed on the filled DEM raster data to obtain preliminary valley line vector data; Feature line interpretation rules are constructed using the mountain shadow raster data and the slope aspect raster data. The preliminary valley line vector data is interpreted according to the feature line interpretation rules to obtain the valley line vector data that needs to be corrected and then corrected. The corrected valley line vector data is then converted into valley line raster data corresponding to the multi-scale DEM raster data.
4. The method according to claim 2, characterized in that, Based on the multi-dimensional raster data, ridgeline raster data is extracted, including: Initial ridgeline vector data are obtained based on multi-scale DEM raster data, slope aspect raster data, and contour vector data; Feature line interpretation rules are constructed using the mountain shadow raster data and the slope aspect raster data. The preliminary ridgeline vector data is then interpreted according to the feature line interpretation rules to obtain the ridgeline vector data that needs to be corrected and corrected. Finally, the corrected ridgeline vector data is converted into ridgeline raster data corresponding to the multi-scale DEM raster data.
5. The method according to claim 3 or 4, characterized in that, The step of constructing feature line interpretation rules based on the mountain shadow raster data and the slope aspect raster data includes: The mountain shadow raster data is used as the bottom layer data and the slope aspect raster data is used as the top layer data. The superimposed data is then colored using a multi-category stretching color scheme and the transparency is set to obtain the slope aspect area data. Based on the color distribution patterns of slope aspect data, feature line interpretation rules are constructed, including: valley lines correspond to lines connecting several low points in the gradually transitioning color gradation area of the slope aspect data; ridge lines correspond to lines connecting several high points in the abrupt color gradation areas on both sides of the slope aspect area.
6. The method according to claim 1, characterized in that, The multi-scale terrain feature line adaptive extraction model that couples multi-source terrain features includes: The DEM encoding module is used to encode the first multi-scale terrain feature line dataset to obtain multi-source features; A multi-source feature fusion module is used to fuse the multi-source features to obtain multi-source fused features; The decoding module is used to decode the multi-source fusion features to obtain the prediction results of terrain feature lines.
7. The method according to claim 6, characterized in that, The DEM encoding module includes, in sequence: a first convolution module, a downsampling module, and a convolution-self-attention collaborative module; The convolution-self-attention collaborative module includes several sets of convolution-self-attention collaborative sub-modules connected in series. The first set of convolution-self-attention collaborative sub-modules uses the output data of the downsampling module as input data, and the other sets of convolution-self-attention collaborative sub-modules use the output data of the previous set of convolution-self-attention collaborative sub-modules as input data. Each group of convolutional-self-attention collaborative sub-modules includes: inputting input data into a first self-attention module to obtain enhanced features; inputting the enhanced features and the input data of the first self-attention module into a first residual connection module and adding them element-wise to obtain fused features; inputting the fused features into a second convolutional module and a third convolutional module in sequence, and then inputting the output of the third convolutional module and the fused features into a second residual connection module and adding them element-wise to obtain multi-source features.
8. The method according to claim 7, characterized in that, The input data is fed into the first self-attention module to obtain enhanced features, including: The input data from the first self-attention module is fed into the fourth convolution module to obtain the query matrix. Key matrix Sum matrix ; By query matrix Bond matrix Semantic relevance is calculated by first calculating spatial proximity based on the input data of the first self-attention module, then fusing the semantic relevance and spatial proximity results, and finally combining the fused result with the value matrix. The fusion process yields a weighted fusion feature. The weighted fusion features are sequentially input into the fifth convolution module, the normalization module, and the first ReLU module to obtain the enhanced features.
9. The method according to claim 8, characterized in that, The calculation of spatial proximity based on the input data of the first self-attention module includes: in, The normalized scaling factor in the vertical direction; This represents the number of downsampling attempts. For height; This is the horizontal normalized scaling factor; Width; The weighted Euclidean distance is squared. The row coordinates of the current center pixel; The column coordinates of the current center pixel; Relative to the center pixel The offset of the row direction; Relative to the center pixel Column direction offset; Spatial weighting factor; The total number of Gaussian kernels; Index for the number of Gaussian kernels; These are learnable weights; These are learnable scaling coefficients; This is a hyperparameter.
10. The method according to claim 1, characterized in that, The terrain feature loss function includes: in, The loss function; The first weighting coefficient; This is the second weighting coefficient; This is the third weighting coefficient; Focus the loss function on small targets; For regional continuity loss function; For edge loss function; Total number of pixels; The total number of categories; Indexed by the number of categories; Category weights; Predict the probability of the class for the model; is the focus parameter; c is the number of pixels; For pixel c, it belongs to category The predicted probability; For pixels Category The true label; For smoothing terms; The weighting coefficients for the edge regions; for The total number of pixels in the edge region of the category; It is the set of pixel position indices of the edge region of category m; This represents the gradient magnitude. For the threshold; The true label image for category m; Use horizontal Sobel convolution kernels; It is a vertical Sobel convolution kernel.