Saddle point extraction method and device, equipment, storage medium and program product
By combining the convolutional neural network with the fusion of positive and negative terrain methods and multi-scale terrain features, the problem of too many pseudo-saddle points during saddle point extraction in the existing technology is solved, the extraction accuracy and accuracy of saddle points are improved, and the intelligent analysis of topography and landforms is promoted.
Patent Information
- Application Number
- CN202411575615.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-11-06
AI Technical Summary
The existing forward and reverse terrain methods are prone to excessive false saddle points when extracting saddle points, and it is difficult to effectively identify them, which affects the extraction accuracy and accuracy of saddle points.
A convolutional neural network combining the positive and negative terrain method and multi-scale terrain features is obtained by extracting the set of candidate saddle points from the DEM data, and extracting the terrain features at multiple scales, inputting them to the pre-trained convolutional neural network, eliminating the pseudo-saddle points to obtain the final saddle point.
It significantly improves the extraction accuracy and accuracy of saddle points, reduces misjudgment of fake saddle points, and promotes intelligent analysis and identification of topography.
Smart Images

Figure CN119762738A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of topographic analysis, and in particular to a saddle point extraction method, device, equipment, storage medium and program product. Background Art
[0002] As one of the topographic features, the saddle is of great significance in the fields of terrain feature extraction and terrain modeling. The saddle is located at the intersection of the lowest point of the ridge line and the highest point of the valley line. The accurate extraction of the saddle has always been a hot topic and difficulty in research. Existing extraction methods include mathematical definition method, contour method, and hydrological method, among which the Positive-Negative Terrain Method (PNTM) is widely used.
[0003] In the related technology, the positive and negative terrain method is inspired by the continuity of the ridge line to invert the original terrain into the negative terrain to ensure the continuity of the valley bottom line, and extract the continuous ridge line of the negative terrain, which is the continuous mountain control line of the positive terrain, avoiding the situation where the saddle is insufficiently extracted due to the use of the broken mountain control line of the original terrain.
[0004] However, due to the complexity of the terrain, the highest point of the valley bottom line is usually disconnected, and it is difficult to intersect with the ridge line, which easily leads to the loss of saddle points. At the same time, this method extracts a large number of pseudo saddle points. Currently, pseudo saddle points are mainly eliminated through manual judgment, based on traditional physical mechanism models, and terrain feature extraction is carried out based on elevation data, without taking into account the multi-scale effect of complex terrain, which needs to be solved urgently. Summary of the invention
[0005] The present application provides a saddle point extraction method, device, equipment, storage medium and program product to solve the problem of too many pseudo saddle points when extracting saddle points by positive and negative terrain methods, improve the extraction precision and accuracy of saddle points, and promote intelligent analysis and identification of terrain and landforms.
[0006] The first aspect of the present application provides a saddle point extraction method, comprising the following steps:
[0007] Obtain DEM data for terrain saddle extraction;
[0008] Based on a preset forward and reverse terrain method, a candidate saddle point set is extracted from the DEM data, and multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales are extracted;
[0009] The multiple terrain features of each candidate saddle point at multiple scales are input into a pre-established convolutional neural network for fusion of multi-scale terrain features, and the pseudo saddle points in the candidate saddle point set are eliminated according to the output results to obtain the final saddle point.
[0010] Optionally, extracting a candidate saddle point set from the DEM data based on a preset forward and inverse terrain method includes:
[0011] Determine reverse DEM data according to the DEM data, extract ridge lines based on the DEM data, and extract mountain control lines based on the reverse DEM data;
[0012] The intersection data of the ridge line and the mountain control line is determined, and the intersection data is preprocessed to obtain the candidate saddle point set.
[0013] Optionally, before inputting the multiple terrain features of each candidate saddle point at multiple scales into the pre-established convolutional neural network for fusion of multi-scale terrain features, the method further includes:
[0014] Obtain a target saddle point set for training;
[0015] Taking each saddle point in the target saddle point set as the center, extracting a plurality of terrain parameters under a preset area to obtain the terrain features of each saddle point in the target saddle point set;
[0016] Determine the saddle control areas of multiple scales, and based on a preset activation function, a preset loss function and the saddle control areas of the multiple scales, train a preset convolutional neural network using the terrain features of each saddle point in the target saddle point set to obtain the pre-established convolutional neural network with multi-scale terrain feature fusion.
[0017] Optionally, the preset activation function is:
[0018]
[0019] Among them, y i is the output value after the activation function, x i It is the output value after weighted product of each layer, and a is a constant between [0, 1).
[0020] Optionally, the preset loss function is:
[0021]
[0022] Among them, Loss is the total loss function, N is the number of samples, K is the number of classifications, x ij is the output value of the fully connected layer, i is the i-th sample, j is the j-th result (including saddle or pseudo-saddle results), f(x ij ) is the probability after normalization of the softmax activation function, y ij is the label probability.
[0023] A second aspect of the present application provides a saddle point extraction device, comprising:
[0024] An acquisition module, used for acquiring DEM data for terrain saddle extraction;
[0025] An extraction module, for extracting a candidate saddle point set from the DEM data based on a preset forward and reverse terrain method, and extracting a plurality of terrain features of each candidate saddle point in the candidate saddle point set at a plurality of scales;
[0026] A determination module is used to input multiple terrain features of each candidate saddle point at multiple scales into a pre-established convolutional neural network that fuses multi-scale terrain features, and eliminate pseudo saddle points in the candidate saddle point set according to the output results to obtain a final saddle point.
[0027] Optionally, the extraction module is specifically used to:
[0028] Determine reverse DEM data according to the DEM data, extract ridge lines based on the DEM data, and extract mountain control lines based on the reverse DEM data;
[0029] The intersection data of the ridge line and the mountain control line is determined, and the intersection data is preprocessed to obtain the candidate saddle point set.
[0030] Optionally, the determining module is further used to:
[0031] Obtain a target saddle point set for training;
[0032] Taking each saddle point in the target saddle point set as the center, extracting a plurality of terrain parameters under a preset area to obtain the terrain features of each saddle point in the target saddle point set;
[0033] Determine the saddle control areas of multiple scales, and based on a preset activation function, a preset loss function and the saddle control areas of the multiple scales, train a preset convolutional neural network using the terrain features of each saddle point in the target saddle point set to obtain the pre-established convolutional neural network with multi-scale terrain feature fusion.
[0034] Optionally, the preset activation function is:
[0035]
[0036] Among them, y i is the output value after the activation function, x i It is the output value after weighted product of each layer, and a is a constant between [0,1).
[0037] Optionally, the preset loss function is:
[0038]
[0039] Among them, Loss is the total loss function, N is the number of samples, K is the number of classifications, x ij is the output value of the fully connected layer, i is the i-th sample, j is the j-th result (including saddle or pseudo-saddle results), f(x ij ) is the probability after normalization of the softmax activation function, y ij is the label probability.
[0040] The third aspect of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the saddle point extraction method as described in the above embodiment.
[0041] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the saddle point extraction method as described in the above embodiment.
[0042] A fifth aspect of the present application provides a computer program product, which stores a computer program. When the program is executed by a processor, the saddle point extraction method described in the above embodiment is implemented.
[0043] Therefore, after obtaining the DEM data for terrain saddle extraction, based on the preset forward and reverse terrain method, the candidate saddle point set is extracted from the DEM data, and multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales are extracted, and the multiple terrain features of each candidate saddle point at multiple scales are input into the pre-established multi-scale terrain feature fusion convolutional neural network, and the pseudo saddle points in the candidate saddle point set are eliminated according to the output results to obtain the final saddle point. Therefore, by combining the forward and reverse terrain method and the multi-scale feature fusion convolutional neural network, the problem of too many pseudo saddle points when extracting saddle points by the forward and reverse terrain method is solved, the extraction precision and accuracy of the saddle points are improved, and the intelligent analysis and recognition of terrain and landforms are promoted.
[0044] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0046] Figure 1A flowchart of a saddle point extraction method provided according to an embodiment of the present application;
[0047] Figure 2 A flow chart of a saddle point extraction method based on a positive and negative terrain method and a multi-scale feature fusion convolutional neural network according to an embodiment of the present application;
[0048] Figure 3 A schematic diagram of geographical features of saddle points in a saddle point extraction method provided according to an embodiment of the present application;
[0049] Figure 4 A schematic diagram of unprocessed and preprocessed candidate saddle points of a saddle point extraction method provided according to an embodiment of the present application;
[0050] Figure 5 A schematic diagram of terrain features at different scales of a saddle point extraction method provided according to an embodiment of the present application;
[0051] Figure 6 A schematic diagram of saddle decision-making for terrain information parallel extraction, multi-channel terrain information fusion, and multi-scale terrain information fusion of a saddle point extraction method provided according to an embodiment of the present application;
[0052] Figure 7 It is a schematic diagram of a saddle point extraction device provided according to an embodiment of the present application;
[0053] Figure 8 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0054] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0055] Before introducing the saddle point extraction method of the embodiment of the present application, several saddle point extraction methods in the related art are briefly introduced.
[0056] The mathematical definition method uses the idea of a moving window to traverse and calculate the two characteristic images of the neighboring elevation difference and the elevation difference change rate of each pixel. Finally, the pixel to which the saddle belongs is determined based on the positive and negative differences in the elevation difference in the orthogonal direction. The advanced method of continuous derivation is used to obtain the second-order derivatives of the neighboring pixels and their curvature directions, and the saddle pixels are identified by combining the positive and negative second-order derivatives and the orthogonality of the curvature direction. Since the mathematical definition method needs to traverse each pixel and the window setting is uncertain, it is easy to ignore the spatial topological relationship between the saddle and the surrounding terrain, and the terrain elements of the saddle are not considered, and huge computing resources are consumed.
[0057] The contour method uses the spatial topological relationship of "mountain top point-saddle top point-mountain top point" to extract saddle points. The saddle is located in the concave part between two adjacent mountain tops. In the contour map, it is represented as the middle part of two parallel positive contour clusters contained in a mountain. Based on this characteristic, the closed contour cluster is converted into contour surface data according to certain rules, and the contour surface tree is constructed. Then, the adjacent topological relationship between the contour surfaces is used to realize recursive search and extraction of saddles. This method ensures the equivalence and spatial proximity of the number of saddles and the number of mountain tops, and ensures the extraction accuracy of the saddle. However, due to the complex terrain, this method can only be used for small area experiments with simple and closed contour cluster topological relationships, and has not been verified in the saddle extraction experiment of a large complex area.
[0058] The hydrological analysis method uses hydrological principles to extract terrain feature lines, and the intersection of terrain feature lines is taken as the saddle point. Since the saddle is located at the intersection of the lowest point of the ridgeline and the highest point of the valley bottom line, the water flow dividing line is extracted as the ridgeline and the water flow converging line is extracted as the valley bottom line (also called the mountain control line). The intersection of the two is extracted by the topological intersection method, which is the saddle. The positive and negative terrain method is a representative method of the hydrological analysis method and is also a commonly used example in textbooks. In order to ensure the continuity of the valley bottom line, this method is inspired by the continuity of the ridgeline, inverts the original terrain into the negative terrain, extracts the ridgeline of the continuous negative terrain, that is, the mountain control line of the continuous positive terrain, and avoids the situation where the saddle is insufficiently extracted due to the use of the broken mountain control line of the original terrain. However, this method uses the method of intersection of the watershed and the positive terrain to eliminate the error caused by negative terrain such as depressions, and inevitably extracts some broken ridgelines. Therefore, there are still a large number of missed and misjudged saddles.
[0059] Since the mathematical definition method lacks consideration of the terrain background and the spatial relationship of the saddle, the contour method is easily constrained by data quality and algorithm complexity. The hydrological analysis method is the most commonly used method for saddle point extraction, because hydrological elements are the most direct result of terrain undulations. Combining hydrological knowledge with saddle extraction can improve the accuracy of saddle extraction.
[0060] Based on the above problems, this application proposes a saddle point extraction method, in which DEM data for terrain saddle extraction is obtained; based on the preset positive and negative terrain method, a candidate saddle point set is extracted from the DEM data, and multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales are extracted; the multiple terrain features of each candidate saddle point at multiple scales are input into a pre-established multi-scale terrain feature fusion convolutional neural network, and the pseudo saddle points in the candidate saddle point set are eliminated according to the output results to obtain the final saddle point. Therefore, by combining the positive and negative terrain method with the multi-scale feature fusion convolutional neural network, the problem of too many pseudo saddle points when extracting saddle points by the positive and negative terrain method is solved, the extraction precision and accuracy of the saddle points are improved, and the intelligent analysis and recognition of terrain and landforms are promoted.
[0061] Specifically, Figure 1 A schematic flow chart of a saddle point extraction method provided in an embodiment of the present application.
[0062] like Figure 1 As shown, the saddle point extraction method includes the following steps:
[0063] In step S101 , DEM data for terrain saddle extraction is obtained.
[0064] Among them, the saddle point is the saddle-shaped depression between two adjacent mountain peaks, the intersection of the lowest point of the ridge and the highest point of the valley, that is, the point that indicates the spatial position of the saddle is called the saddle point; DEM (Digital Elevation Model) is a data form that represents ground elevation information. It is a data set that describes the surface morphology of the earth through a series of regularly or irregularly distributed points.
[0065] Specifically, for the extraction of terrain saddle points, LIDAR data, regular grid DEM data and regular triangulated Irregular Network (TIN) DEM data are usually selected. Regular grid DEM data is the most commonly used terrain saddle extraction data; after obtaining the DEM data, the data needs to be preprocessed, including but not limited to data format conversion, splicing different DEM slices, removing noise, correcting errors, etc., to ensure the quality of the DEM data and make it suitable for the needs of the saddle point extraction task; in order to facilitate the analysis and processing of DEM data, it is usually necessary to import it into Geographic Information System (GIS) software or other professional terrain analysis tools to better view the DEM data and perform necessary processing steps.
[0066] In step S102, based on a preset forward and inverse terrain method, a candidate saddle point set is extracted from the DEM data, and multiple terrain features at multiple scales of each candidate saddle point in the candidate saddle point set are extracted.
[0067] Among them, the preset forward and reverse terrain method is a technology used to extract terrain saddle points from DEM data. It uses a combination of forward and reverse DEM data to extract ridge lines and mountain control lines (i.e., valley bottom lines) to determine saddle points; the candidate saddle point set refers to the potential saddle points preliminarily screened out by the forward and reverse terrain method.
[0068] Specifically, the reverse DEM data is determined based on the original DEM data; the reverse DEM data is obtained by inverting the elevation value in the original DEM data, which is done to extract the mountain control line in the subsequent steps; using the DEM data, the ridge line is extracted based on the hydrological analysis method. The ridge line is the boundary line of water flow in the terrain, which can be determined by calculating the flow direction, confluence and other steps; the mountain control line is extracted based on the reverse DEM data. The mountain control line reflects the bottom line of the valley in the terrain and can also be extracted by the hydrological analysis method; the intersection data of the ridge line and the mountain control line are found, and these intersection points are the candidate saddle points; the intersection data is preprocessed to obtain the candidate saddle point set. Extracting multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales requires selecting different terrain analysis scales, which are defined as terrain features at different scales; at each selected scale, multiple terrain features are extracted for the candidate saddle point.
[0069] Optionally, in some embodiments, based on a preset forward and inverse terrain method, a candidate saddle point set is extracted from the DEM data, including: determining inverse DEM data based on the DEM data, and extracting ridge lines based on the DEM data, and extracting mountain control lines based on the inverse DEM data; determining intersection data of the ridge line and the mountain control line, and preprocessing the intersection data to obtain a candidate saddle point set.
[0070] It is understandable that by combining forward and reverse DEM data, the undulation of the terrain can be captured more comprehensively, thereby preliminarily screening out areas that may contain saddle points. Forward DEM data is used to extract ridge lines, reflecting the convex features of the terrain; reverse DEM data is used to extract mountain control lines, reflecting the concave features of the terrain; the combined use of forward and reverse terrain methods can avoid insufficient extraction of saddle points due to the complexity of the terrain, and ensure that as many potential saddle points as possible are extracted; although the initial screening may contain some pseudo saddle points, these misjudged points can be effectively reduced through further identification by subsequent neural networks, thereby improving the accuracy of saddle point extraction.
[0071] Further, the saddle point extraction method is described in detail in conjunction with an embodiment of the present application, and the steps are as follows:
[0072] The saddle is located at the concave connection between the two mountain tops. This area meets the terrain requirements of convexity in one direction and concaveness in the other orthogonal direction on the two vertical lines, where the convex boundary line fits the boundary line of the mountain control area, and the concave boundary line coincides with the ridge line (such as Figure 3 Therefore, the forward and reverse terrain method is used to extract candidate saddle points. First, the ridge line is extracted based on the DEM data, then the mountain control line is extracted based on the reverse DEM data, and finally the intersection of the ridge line and the mountain control line is preprocessed to obtain the candidate saddle point.
[0073] Step 1: Extract ridgeline Rl. In this step, the ridgeline is extracted by hydrological analysis and the positive terrain Tpos is used to eliminate the influence of negative terrain Tneg.
[0074] Step 1.1: Calculate the mean DEM, denoted as The expression is:
[0075]
[0076] Where DEM is the original elevation data, and Neighborhoodmeananalysis(·) is the mean neighborhood calculation with a 11×11 window.
[0077] Calculate the original elevation data DEM and The difference is greater than 0 for positive terrain Tpos, and the difference is less than 0 for negative terrain, which can be expressed as:
[0078]
[0079]
[0080] Step 1.2: Extract the watershed boundary line based on the D8 algorithm. First, set a small elevation difference h, fill the DEM, eliminate the influence of fuzzy terrain, and obtain the DEM. filled ; Secondly, according to the elevation difference relationship, the flow direction relationship of each DEM grid is calculated to obtain the flow direction grid Flow_dir, which can be expressed as:
[0081] Flow_dir = Flowdirection(DEM filled )
[0082] Then, the confluence grid Flow_acc is calculated based on the flow direction grid, which can be expressed as:
[0083] Flow_acc=Flowaccumulation(Flow_dir)
[0084] Finally, extract the grid with flow rate of 0. Usually, the flow rate at the boundary of the watershed is 0, which is recorded as Wl. The above flow direction and flow calculation can be completed based on ArcGIS tools.
[0085] Step 1.3: Extract the ridge line Rl to eliminate the negative terrain effect, which can be expressed as:
[0086] Rl=Wl×Ter pos
[0087] Step 2: Extract the mountain control line Sl. This step refers to step 1 to extract the mountain control line based on the reverse DEM data, and use the negative terrain Tneg to eliminate the influence of the positive terrain Tpos.
[0088] Step 2.1: Calculate the inverse DEM data It can be expressed as:
[0089]
[0090] Step 2.2: Based on Use D8 algorithm to extract mountain control lines. Filling and calculating flow direction grid Catchment grid Extracting reverse flow boundary The above process can be expressed as:
[0091]
[0092]
[0093]
[0094] In the formula This is the inverse DEM after the depression filling process.
[0095] Step 2.3: Extract the mountain control line Sl to eliminate the positive terrain effect, which can be expressed as:
[0096]
[0097] Step 3: Extract the candidate saddle point set S. This set is the intersection of the ridge line Rl and the mountain control line S1, which can be expressed as:
[0098] S=Rl ∩ Sl
[0099] The saddle point obtained at this time is Figure 4 As shown in (b), (c) and (d), a saddle point may correspond to multiple grid cells, which may lead to a large number of duplications in the vectorization process. Therefore, we perform dimensionality reduction preprocessing on the case where a saddle point corresponds to a grid block, as shown in Figure 4As shown in (b1), (c1) and (d1), any grid of the grid block is taken to represent the saddle point. The candidate saddle point set S is obtained by the preprocessing operation.
[0100] In step S103, multiple terrain features of each candidate saddle point at multiple scales are input into a pre-established convolutional neural network for multi-scale terrain feature fusion, and pseudo saddle points in the candidate saddle point set are eliminated according to the output results to obtain the final saddle point.
[0101] Among them, the multi-scale feature fusion convolutional neural network (CNN) is a convolutional neural network that accepts data input of different scales through multiple channels and provides feature fusion.
[0102] Specifically, a convolutional neural network for saddle point decision including parallel extraction of terrain information, fusion of multi-channel terrain information, and fusion of multi-scale terrain information is built; the network includes parallel extraction of terrain information, and at different scales, five independent parallel convolutional neural networks are set for each scale, with a total of 20 parallel convolutional neural networks for feature extraction; multi-channel terrain information fusion, merging the deep terrain semantic information of each channel and performing convolution operations; saddle point decision of multi-scale terrain information fusion, including three hidden layers, the terrain information of each scale is spliced and flattened through the channels, and then input into three fully connected layers to output the judgment result of the saddle point; activation function design, using Leaky The Relu function is used as the activation function to improve the nonlinear simulation ability of the network; the loss function is designed, using binary cross entropy as the loss function to quantify the difference between the training results and the actual label results, and to adjust the weights in the model; the multi-scale terrain features of each candidate saddle point are input into the pre-trained convolutional neural network, and the saddle point is determined based on the output of the network. If the network output indicates that the point is a real saddle point, the point is retained; if it is a pseudo saddle point, the point is removed; through the above steps, the pseudo saddle points in the candidate saddle point set are removed, and the final result is a verified real saddle point set.
[0103] Optionally, in some embodiments, the preset activation function is:
[0104]
[0105] Among them, y i is the output value after the activation function, x i It is the output value after weighted product of each layer, and a is a constant between [0,1).
[0106] It can be understood that the activation function ensures that all negative values have non-zero slopes, avoiding the problem of premature gradient vanishing or gradient explosion during training, and contributing to the stable training of the neural network; when constructing a convolutional neural network that integrates multi-scale terrain features, the activation function is applied to each level to ensure that the network can learn the complex nonlinear relationship of saddle point extraction; by introducing the activation function, the neural network can better simulate the decision-making behavior of experts, thereby improving the recognition efficiency of pseudo saddle points.
[0107] Optionally, in some embodiments, the preset loss function is:
[0108]
[0109] Among them, Loss is the total loss function, N is the number of samples, K is the number of classifications, x ij is the output value of the fully connected layer, i is the i-th sample, j is the j-th result (including saddle or pseudo-saddle results), f(x ij ) is the probability after normalization of the softmax activation function, y ij is the label probability.
[0110] It is understandable that the loss function is mainly used in the model training stage to quantify the difference between the training results and the actual label results, and adjust the various weights in the model based on the loss back propagation; the performance of the model is evaluated by calculating the difference between the actual label probability and the model prediction probability. During the training process, the model will continuously adjust its parameters to minimize the loss function, thereby improving the model's extraction precision and accuracy of saddle points; combined with the convolutional neural network with multi-scale feature fusion, this method can fully consider the terrain features of different scales when extracting saddle points, thereby improving the accuracy and robustness of the extraction.
[0111] Therefore, after obtaining the DEM data for terrain saddle extraction, based on the preset forward and reverse terrain method, the candidate saddle point set is extracted from the DEM data, and multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales are extracted, and the multiple terrain features of each candidate saddle point at multiple scales are input into the pre-established multi-scale terrain feature fusion convolutional neural network, and the pseudo saddle points in the candidate saddle point set are eliminated according to the output results to obtain the final saddle point. Therefore, by combining the forward and reverse terrain method and the multi-scale feature fusion convolutional neural network, the problem of too many pseudo saddle points when extracting saddle points by the forward and reverse terrain method is solved, the extraction precision and accuracy of the saddle points are improved, and the intelligent analysis and recognition of terrain and landforms are promoted.
[0112] Optionally, in some embodiments, before inputting multiple terrain features of each candidate saddle point at multiple scales into a pre-established convolutional neural network with multi-scale terrain feature fusion, it also includes: obtaining a target saddle point set for training; taking each saddle point in the target saddle point set as the center, extracting multiple terrain parameters under a preset area to obtain the terrain features of each saddle point in the target saddle point set; determining the saddle control areas at multiple scales, and based on a preset activation function, a preset loss function and the saddle control areas at multiple scales, training a preset convolutional neural network using the terrain features of each saddle point in the target saddle point set to obtain a pre-established convolutional neural network with multi-scale terrain feature fusion.
[0113] Among them, the target saddle point set refers to the real saddle point set finally determined after being processed by the multi-scale terrain feature fusion convolutional neural network.
[0114] Furthermore, in conjunction with an embodiment of the present application, how to establish a convolutional neural network for multi-scale terrain feature fusion is described in detail, the steps are as follows:
[0115] The establishment of a convolutional neural network for multi-scale terrain feature fusion generally includes three contents: terrain feature extraction, multi-scale terrain feature construction, and convolutional neural network construction for multi-scale terrain feature fusion.
[0116] Step 1: Extract terrain features. Here, five terrain parameters, namely, elevation E, slope A, curvature C, slope S, and mountain shadow H, are extracted from each saddle point as the center of a specific area as the input parameters of the convolutional neural network. Each parameter is a grayscale image. Referring to the three channels of the RGB color image, each grayscale image is regarded as a channel, and the input image of the convolutional neural network is a multi-channel fusion image. It can be expressed as:
[0117] E=Elevation(DEM)
[0118] A=Aspect(DEM)
[0119] C=Curve(DEM)
[0120] S=Slope(DEM)
[0121] H=Hillshade(DEM)
[0122] Step 2: Construct multi-scale terrain features. Here, the area of the saddle and the two peaks at the same horizontal plane at the saddle elevation is called the saddle control area. Because the distance, elevation and size of the two mountains in different saddles are different, the saddle control area will also be different, so there will be differences in the spatial range of reference for saddle range extraction. In order to ensure that the terrain information fed into the convolutional neural network can cover the control area of all saddles and make decisions based on terrain features of different scales, four scales of saddle control areas are set here, and the control area window size corresponding to each scale is the minimum integer value, the maximum integer value and two quartered values of the saddle control area of all samples, such as Figure 5 As shown in the figure, they are 400m×400m, 800m×800m, 1200m×1200m, and 1600m×1600m. The terrain features of each scale are recorded as Feature 400 ={E 400 , A 400 , C 400 , S 400 , H 400}、Feature 800 ={E 800 , A 800 , C 800 , S 800 , H 800}、Feature 1200 ={E 1200 , A 1200 , C 1200 , S 1200 , H 1200}、Feature 1600 ={E 1600 , A 1600 , C 1600 , S 1600 , H 1600}.
[0123] Step 3: Establish a convolutional neural network for multi-scale terrain feature fusion. The network includes parallel extraction of terrain information, fusion of multi-channel terrain information, and saddle decision of multi-scale terrain information fusion.
[0124] Step 3.1: The parallel extraction stage of terrain information includes two parts: feature extraction and parallel calculation. Neural networks at different levels can extract different feature information. Shallow neural networks can extract low-level visual information such as texture and boundary, while deep neural networks can extract deep-level semantic information. In the multi-feature fusion application of neural networks, deep semantic features are usually used for fusion. For this reason, multi-layer neural networks are used in the parallel extraction steps of each channel feature to extract the original data and then perform deep-level semantic feature fusion. Figure 6As shown in (a), three convolution kernels are used to extract the input features of each channel. The convolution kernels are all 3*3 small convolution kernels (Table 1), because small convolution kernels are more conducive to preserving local features. Convolution kernel 1 and convolution kernel 2 are used to extract shallow visual features, and convolution kernel 3 is used to extract deep semantic features. Finally, in order to keep the scale of the fusion features consistent, they are resampled to 4*4 feature maps. Before resampling, the input feature sizes of each channel are inconsistent, and the feature level cannot meet the requirements of feature fusion. Therefore, Figure 6 (a) Before resampling, five independent parallel convolutional neural networks are set up for each scale, and a total of 20 parallel convolutional neural networks are used for feature extraction. The process is expressed as:
[0125]
[0126] In the formula represents the terrain information of the ith channel of scale s after convolution calculation extracted by multi-channel terrain information, Represents the i-th terrain feature of scale s.
[0127] Table 1
[0128]
[0129] Table 2
[0130]
[0131] Step 3.2: Fusion of multi-channel terrain information. Figure 6 (b) and Table 2 show that the deep terrain semantic information of each channel with the same size after resampling is first merged, and then two layers of convolution operations are performed, and the convolution kernels are all 3*3 small convolution kernels. It can be expressed as:
[0132]
[0133] Step 3.3: Saddle decision based on multi-scale terrain information fusion. Figure 6 As shown in (c), this link includes three hidden layers. The terrain information of each scale is concatenated through channels, flattened, and then input into three fully connected layers to output the judgment results of the saddle points.
[0134] y=Softmax(Fully_connect(Concatenate(FC4 00 , FC 800 , FC 1200 , FC 1600 )))
[0135] Step 3.4: Activation function design. To improve the nonlinear simulation capability of the network, activation functions need to be added to each layer so that the neural network can have layered nonlinear mapping learning capabilities. Therefore, the Leaky Relu function is selected as the activation function of each layer to ensure that all negative values have non-zero slopes to avoid gradient vanishing or gradient exploding too early in training. The specific calculation method is as follows:
[0136]
[0137] Where y i is the output value after the activation function, x i It is the output value after weighted product of each layer, a is a constant between [0, 1), usually set to 0.5.
[0138] Step 3.5: Loss function design. The loss function is used in the model training phase to quantify the difference between the training results and the actual label results, and adjust the weights in the model based on the loss backpropagation. Here, the model output is the probability of retaining or not retaining the candidate saddle, which can be regarded as a binary classification problem. Therefore, binary cross entropy is selected as the loss function, and its calculation method is as follows:
[0139]
[0140] Where Loss is the total loss function; N is the number of samples; K is the number of categories; x ij is the output value of the fully connected layer, f(x ij ) is the probability after normalization of the softmax activation function; y ij is the label probability.
[0141] Therefore, by taking the target saddle point as the center and extracting multiple terrain parameters under a preset area, the terrain characteristics of the saddle point can be fully captured; these features are extracted at multiple scales, which helps to cover the control area and terrain complexity of different saddle points, and provide rich input data for subsequent neural network training; the convolutional neural network is trained using the extracted terrain features, so that the network can learn the multi-scale terrain characteristics of the saddle point; through the preset activation function and loss function, the network weights and biases are optimized to improve the network's recognition ability of saddle points; the mechanism of multi-scale terrain feature fusion enables the network to comprehensively consider terrain information of different scales and improve the accuracy and robustness of recognition; the trained convolutional neural network can discriminate candidate saddle points and distinguish true and false saddle points; through the output results of the network, the false saddle points in the candidate saddle point set can be eliminated to obtain the final saddle point set. According to the saddle point extraction method proposed in the embodiment of the present application, DEM data for terrain saddle extraction is obtained; based on the preset positive and negative terrain method, a candidate saddle point set is extracted from the DEM data, and multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales are extracted; the multiple terrain features of each candidate saddle point at multiple scales are input into a pre-established convolutional neural network with multi-scale terrain feature fusion, and pseudo saddle points in the candidate saddle point set are eliminated according to the output results to obtain the final saddle point. Thus, by combining the positive and negative terrain method with the multi-scale feature fusion convolutional neural network, the problem of too many pseudo saddle points when extracting saddle points by the positive and negative terrain method is solved, the extraction precision and accuracy of saddle points are improved, and the intelligent analysis and recognition of terrain and landforms are promoted.
[0142] Next, the saddle point extraction device proposed according to the embodiment of the present application is described with reference to the accompanying drawings.
[0143] Figure 7 It is a block diagram of a saddle point extraction device according to an embodiment of the present application.
[0144] like Figure 7 As shown, the saddle point extraction device 10 includes: an acquisition module 100 , an extraction module 200 and a determination module 300 .
[0145] Wherein, the acquisition module 100 is used to acquire DEM data for terrain saddle extraction;
[0146] An extraction module 200 is used to extract a candidate saddle point set from the DEM data based on a preset forward and reverse terrain method, and extract multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales;
[0147] The determination module 300 is used to input multiple terrain features of each candidate saddle point at multiple scales into a pre-established convolutional neural network that fuses multi-scale terrain features, and eliminate pseudo saddle points in the candidate saddle point set according to the output results to obtain the final saddle point.
[0148] Optionally, the extraction module 200 is specifically used to: determine the reverse DEM data according to the DEM data, extract the ridge line based on the DEM data, and extract the mountain control line based on the reverse DEM data; determine the intersection data of the ridge line and the mountain control line, and pre-process the intersection data to obtain a candidate saddle point set.
[0149] Optionally, the determination module 300 is also used to: obtain a target saddle point set for training; extract multiple terrain parameters under a preset area with each saddle point in the target saddle point set as the center, and obtain the terrain characteristics of each saddle point in the target saddle point set; determine the saddle control areas of multiple scales, and based on a preset activation function, a preset loss function and the saddle control areas of multiple scales, train a preset convolutional neural network using the terrain characteristics of each saddle point in the target saddle point set to obtain a pre-established convolutional neural network with multi-scale terrain feature fusion.
[0150] Optionally, the preset activation function is:
[0151]
[0152] Among them, y i is the output value after the activation function, x i It is the output value after weighted product of each layer, and a is a constant between [0, 1).
[0153] Optionally, the preset loss function is:
[0154]
[0155] Among them, Loss is the total loss function, N is the number of samples, K is the number of classifications, x ij is the output value of the fully connected layer, i is the i-th sample, j is the j-th result (including saddle or pseudo-saddle results), f(x ij ) is the probability after normalization of the softmax activation function, y ij is the label probability.
[0156] It should be noted that the above explanation of the embodiment of the saddle point extraction method is also applicable to the saddle point extraction device of this embodiment, which will not be repeated here.
[0157] According to the saddle point extraction device proposed in the embodiment of the present application, DEM data for terrain saddle extraction is obtained; based on the preset positive and negative terrain method, a candidate saddle point set is extracted from the DEM data, and multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales are extracted; the multiple terrain features of each candidate saddle point at multiple scales are input into a pre-established convolutional neural network with multi-scale terrain feature fusion, and pseudo saddle points in the candidate saddle point set are eliminated according to the output result to obtain the final saddle point. Therefore, by combining the positive and negative terrain method with the multi-scale feature fusion convolutional neural network, the problem of too many pseudo saddle points when extracting saddle points by the positive and negative terrain method is solved, the extraction precision and accuracy of saddle points are improved, and the intelligent analysis and recognition of terrain and landforms are promoted.
[0158] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0159] A memory 801 , a processor 802 , and a computer program stored in the memory 801 and executable on the processor 802 .
[0160] When the processor 802 executes the program, the saddle point extraction method provided in the above embodiment is implemented.
[0161] Furthermore, the electronic device further comprises:
[0162] The communication interface 803 is used for communication between the memory 801 and the processor 802 .
[0163] The memory 801 is used to store computer programs that can be executed on the processor 802 .
[0164] The memory 801 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0165] If the memory 801, the processor 802 and the communication interface 803 are implemented independently, the communication interface 803, the memory 801 and the processor 802 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0166] Optionally, in a specific implementation, if the memory 801, the processor 802 and the communication interface 803 are integrated on a chip, the memory 801, the processor 802 and the communication interface 803 can communicate with each other through an internal interface.
[0167] The processor 802 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0168] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the program implements the above-mentioned saddle point extraction method when executed by a processor.
[0169] An embodiment of the present application further provides a computer program product, which stores a computer program, and when the program is executed by a processor, the above saddle point extraction method is implemented.
[0170] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0171] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0172] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0173] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0174] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
Claims
1. A saddle point extraction method, characterized in that: The following steps are involved: Obtain DEM data for terrain saddle extraction; Based on a preset forward and reverse terrain method, a candidate saddle point set is extracted from the DEM data, and multiple terrain features of each candidate saddle point in the candidate saddle point set at multiple scales are extracted; The multiple terrain features of each candidate saddle point at multiple scales are input into a pre-established convolutional neural network for fusion of multi-scale terrain features, and the pseudo saddle points in the candidate saddle point set are eliminated according to the output results to obtain the final saddle point.
2. The method according to claim 1, characterized in that The method of extracting a candidate saddle point set from the DEM data based on a preset forward and reverse terrain method includes: Determine reverse DEM data according to the DEM data, extract ridge lines based on the DEM data, and extract mountain control lines based on the reverse DEM data; The intersection data of the ridge line and the mountain control line is determined, and the intersection data is preprocessed to obtain the candidate saddle point set.
3. The method according to claim 1, characterized in that Before inputting the multiple terrain features of each candidate saddle point at multiple scales into the pre-established convolutional neural network for fusion of multi-scale terrain features, the method further includes: Obtain a target saddle point set for training; Taking each saddle point in the target saddle point set as the center, extracting a plurality of terrain parameters under a preset area to obtain the terrain features of each saddle point in the target saddle point set; Determine the saddle control areas of multiple scales, and based on a preset activation function, a preset loss function and the saddle control areas of the multiple scales, train a preset convolutional neural network using the terrain features of each saddle point in the target saddle point set to obtain the pre-established convolutional neural network with multi-scale terrain feature fusion.
4. The method according to claim 3, characterized in that The preset activation function is: Among them, y i is the output value after the activation function, x i It is the output value after weighted product of each layer, and a is a constant between [0,1).
5. The method according to claim 3, characterized in that: The preset loss function is: Among them, Loss is the total loss function, N is the number of samples, K is the number of classifications, x ij is the output value of the fully connected layer, i is the i-th sample, j is the j-th class result, f(x ij ) is the probability after normalization of the softmax activation function, y ij is the label probability.
6. A saddle point extraction device, characterized in that: include: An acquisition module, used for acquiring DEM data for terrain saddle extraction; An extraction module, for extracting a candidate saddle point set from the DEM data based on a preset forward and reverse terrain method, and extracting a plurality of terrain features of each candidate saddle point in the candidate saddle point set at a plurality of scales; A determination module is used to input multiple terrain features of each candidate saddle point at multiple scales into a pre-established convolutional neural network that fuses multi-scale terrain features, and eliminate pseudo saddle points in the candidate saddle point set according to the output results to obtain a final saddle point.
7. The device according to claim 6, characterized in that The extraction module is specifically used for: Determine reverse DEM data according to the DEM data, extract ridge lines based on the DEM data, and extract mountain control lines based on the reverse DEM data; The intersection data of the ridge line and the mountain control line is determined, and the intersection data is preprocessed to obtain the candidate saddle point set.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the saddle point extraction method according to any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the saddle point extraction method according to any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the saddle point extraction method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Mountain line extraction method based on Gaussian scale space
CN104899865A
Contour line-based saddle point extraction method
CN107895370A
A saddle point extraction method based on a contour line model
CN109739942A
Saddle point identification method based on deep convolutional neural network
CN110569871A
Terrain feature line extraction method and device and equipment
CN113505650A