DEM flying spot detection method based on connected domain judgment
Through the DEM fly point detection method based on the connection domain judgment, the problems of low detection efficiency and poor reliability in the traditional method are solved, and high-precision and high-efficiency fly point detection is realized. It is suitable for all terrain types and improves the ability of DEM data quality control.
Patent Information
- Application Number
- CN202411961254.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-30
Smart Images

Figure CN119862245A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of geographic information surveying and mapping, and is used for quality inspection and acceptance of digital elevation model (DEM) data, and is used for automatically performing flying point detection statistical analysis with high precision and high efficiency, so as to meet the high-precision quality control requirements of DEM data quality inspection and acceptance. Background Art
[0002] Traditional flying spot detection methods mainly include manual visual inspection, shading map inspection, contour line fitting inspection and neighborhood statistical inspection.
[0003] 1) Manual visual inspection: Visually observe the topographic map or contour map generated by DEM data to identify abnormal elevation points or areas. This method is inefficient for large-scale DEM data and is easily affected by subjective factors, resulting in unstable detection results and cannot be applied on a large scale.
[0004] 2) Shaded image inspection: In a two-dimensional perspective, the shading image technology is used to highlight the three-dimensional data features, superimpose DOM and DLG data, and use "rolling curtain" and "transparency" methods to visually observe and distinguish the terrain transition anomalies of DEM data. This method has low inspection efficiency, is insensitive to subtle anomalies, is prone to missed judgments, and requires a combination of manual and visual methods, and cannot be applied on a large scale.
[0005] 3) Contour fit check: The contour lines generated by the DEM data are fit and compared with the contour lines on the original map or other terrain representations. By checking the degree of fit of the contour lines, it is determined whether there are elevation anomalies in the DEM data. This method requires the original map as a reference. It is difficult to obtain high-quality original data in some areas. In areas with complex and changeable terrain, the contour fit check may be affected by factors such as terrain undulations and vegetation coverage, leading to misjudgment.
[0006] 4) Neighborhood statistics check: Calculate the mean, median, standard deviation and other statistics in the neighborhood around each point, and judge the abnormal points according to the set threshold. This method is suitable for the preliminary screening of large-scale DEM data, but the detection results are greatly affected by factors such as terrain complexity and data source quality. It is sensitive to the normality assumption of DEM data and it is difficult to distinguish between real terrain features and elevation abnormal points. In addition, this method cannot judge the situation of continuous flying points and is prone to miss.
[0007] In summary, the traditional flying point detection method plays a certain role in DEM data quality control, but it has many limitations such as low detection efficiency, poor reliability, insensitivity to subtle anomalies, and missed continuous flying points. Therefore, exploring an efficient, accurate, and practical flying point detection method is of great significance for improving the quality of DEM data and ensuring the accuracy of subsequent applications. Summary of the invention
[0008] In order to overcome the shortcomings of the prior art, the present invention provides a DEM flying point detection method based on connected domain judgment. With the help of the concept of connected components in graph theory, a DEM flying point detection method based on connected domain judgment is proposed, which draws on the traditional flying point detection method. The method starts from the upper left corner point of the map sheet through a breadth-first algorithm, and traverses each grid point in the grid along the grid until the minimum elevation difference between all grid points and adjacent surrounding grid points is calculated. Because it is necessary to traverse each grid point, it is necessary to traverse the grid minimum elevation difference according to the original grid elevation value and calculate it, and then compare the calculated grid minimum difference with the set threshold value, perform connected domain statistical analysis and flying point calculation, and exclude the connected domain with the largest area, that is, the data normal value, then the grid points in all connected domains except this connected domain are flying points, and the flying points in the DEM data can be effectively identified accordingly, the detection efficiency and accuracy are improved, and a new technical means is provided for the preprocessing and quality control of DEM data.
[0009] The specific steps of the technical solution adopted by the present invention to solve its technical problem are:
[0010] Step 1: Calculate the minimum elevation difference of 8 neighborhoods;
[0011] Calculate the minimum elevation difference of the 8-neighborhood grid point. The connectivity determination principle is: point P c As the center, calculate P c The 8 adjacent points The elevation difference, 1≤x≤8, if P c and If the difference is less than or equal to the threshold Δ, then P c and Under the threshold Δ, it is connected. Otherwise, if P c and If the difference is greater than the threshold Δ, then P c and It is disconnected under the threshold Δ;
[0012] Step 2: Solve the connected domain based on the threshold;
[0013] Take the DEM data as the grid point elevation difference matrix, take the threshold Δ as the judgment value, and solve each connected domain in the grid point elevation difference matrix in a breadth-first or depth-first manner according to the connectivity judgment principle in step 1, and count the number of connected domains under the threshold Δ and the number of points contained in each connected domain;
[0014] Step 3: Baseline threshold selection;
[0015] Starting from the threshold Δ=2, we get the number of connected domains and the number of points contained in each connected domain when the threshold is Δ. Under a certain threshold Δ, if the number of grid points contained in the connected domain with the largest area is less than a%, then the threshold Δ is increased by 1, and steps 1 to 2 are repeated until the number of grid points contained in the connected domain with the largest area accounts for more than a% of the entire map. At this time, the threshold is the benchmark threshold Δ min , except for the points included in this connected domain, all other points are considered as abnormal points;
[0016] Step 4: Statistical analysis of outliers;
[0017] Based on the reference threshold Δ min At the beginning, the threshold is increased by 1 each time, and steps 1 to 2 are repeated to count the number of connected domains and abnormal points under each threshold until there is only one connected domain in the whole image. At this time, the corresponding threshold is Δmax;
[0018] Step 5: Flying point determination;
[0019] The statistical threshold is Δ min ~Δ max When the range is reached, the inspection results of the number of connected domains and the number of abnormal points corresponding to each threshold are obtained, and the proportion of each number of connected domains and the number of abnormal points to the total number of points is statistically analyzed to determine the flying points.
[0020] The percentage a% takes a value of 99%.
[0021] The specific judgment principles in step 5 are:
[0022] The specific method for determining flying points based on the ratio of abnormal points to the total number of points is as follows:
[0023] According to the threshold Δ min ~Δ max The ratio of abnormal points to the total number of points corresponding to each threshold is calculated, and the abnormal points with a ratio less than the specified ratio are determined as flying points. The specified ratio is one ten-thousandth of the number of abnormal points to the total number of points. For example, in Table 1, when the threshold Δ=10, the ratio of abnormal points to the total number of points is 0.0376‰, which is less than one ten-thousandth, that is, 0.0376‰<0.1‰, so the 24 abnormal points under the threshold Δ=10 are all flying points.
[0024] The specific judgment principles in step 5 are:
[0025] The flying point determination based on setting the threshold value based on artificial experience is specifically based on artificial experience, and the threshold range for determining abnormal points as flying points is summarized. The threshold range summarized is different according to the different map terrains. The specific terrain type and the threshold range are as follows: the elevation difference threshold in plain terrain is 0-2, the elevation difference threshold in hilly terrain is 3-6, the elevation difference threshold in mountainous terrain is 7-25, and the elevation difference threshold in high mountainous terrain is 26-90. Points outside this elevation difference threshold range are flying points.
[0026] An electronic device comprises: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method as described above.
[0027] A computer-readable storage medium stores program codes, and the program codes can be called by a processor to execute the method as described above.
[0028] The beneficial effect of the present invention is that it can be applied to all existing terrain types. For example, in flat terrain, it is difficult to detect the slight differences in flat terrain by traditional manual experience inspection, while the 8-neighborhood minimum elevation difference in this algorithm can calculate the outliers in the minimum range of 8 neighborhoods, so the inspection accuracy is greatly improved. In addition, in the test process, for batch maps of the same terrain, such as 128 experimental data, after setting a specified threshold or specifying the proportion of outliers to the total number of points, the algorithm checks the batch maps one by one, and finally obtains the statistical analysis results of the number of flying points. The algorithm checks the flying point determination of batch maps, which not only ensures the accuracy of the flying point determination results, but also improves the inspection efficiency and saves a lot of manpower and time. In actual application scenarios, it has also been used on a small scale and has been unanimously recognized by users. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 To calculate the minimum elevation difference diagram of 8 neighborhoods, Figure 1 (a) is to calculate the minimum elevation difference map of 8 neighborhoods, Figure 1 (b) is the 8-neighborhood connectivity graph for judgment.
[0030] Figure 2 This is a schematic diagram of the minimum elevation difference matrix connected domain algorithm. Figure 2 (a) is the elevation value map of DEM data, Figure 2 (b) is the minimum elevation difference matrix diagram, Figure 2 (c) is a schematic diagram of the connected domain.
[0031] Figure 3 The flowchart for determining flying points based on setting thresholds and abnormal point proportions is shown in FIG.
[0032] Figure 4 This is the test effect diagram of abnormal points in high mountains.
[0033] Figure 5 This is a graph showing the relationship between the high mountain threshold and the ratio of outlier points to the total number of points.
[0034] Figure 6 This is the test effect diagram of mountain anomaly points.
[0035] Figure 7 This is a graph showing the relationship between the mountain threshold and the ratio of outliers to the total number of points.
[0036] Figure 8 This is the test effect diagram of hilly outlier points.
[0037] Fig. 9 The relationship between the hill threshold and the ratio of outliers to the total number of points.
[0038] Fig.10 This is the test effect diagram of the flat ground abnormal point.
[0039] Fig.11 This is a graph showing the relationship between the flat ground threshold and the ratio of outliers to the total number of points. DETAILED DESCRIPTION
[0040] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0041] The specific steps of the DEM flying point detection method based on 8-neighborhood connected domain are as follows:
[0042] Step 1: Calculate the minimum elevation difference of the 8 neighborhoods
[0043] Calculate the minimum elevation difference of the 8-neighborhood grid point. The connectivity determination principle is: Figure 1 As shown in (a), point P c As the center, calculate P c The 8 adjacent points The elevation difference, 1≤x≤8, if P c and If the difference is less than or equal to the threshold Δ, then P c and Under the threshold Δ, it is connected. Otherwise, if P c and If the difference is greater than the threshold Δ, then P c and It is disconnected under the threshold Δ, such as Figure 1 In (b), green is used to represent the center point P c is connected, red indicates disconnected, assuming P c Under the threshold Δ is connected, and then find P c and The minimum value of the elevation difference between the three points;
[0044] Step 2: Solve the connected domain based on the threshold
[0045] Take the DEM data as the grid point elevation difference matrix, take the threshold Δ as the judgment value, and solve each connected domain in the grid point elevation difference matrix in a breadth-first or depth-first manner according to the connectivity judgment principle in step 1, and count the number of connected domains under the threshold Δ and the number of points contained in each connected domain. Figure 2 (a) shows DEM data. The threshold Δ=5 is set to solve the connected domain of DEM data. The solution process is as follows: Figure 2 (b) Figure 2 (c) The final connected domain result map is given. When the threshold is 5, there are 3 connected domains. Connected domain 1 (green area) includes 9 grid points, connected domain 2 (purple area) includes 13 grid points, and connected domain 3 (orange area) includes 3 grid points.
[0046] Step 3: Baseline Threshold Selection
[0047] Starting from the threshold Δ=2, we get the number of connected domains and the number of points contained in each connected domain when the threshold is Δ. Under a certain threshold Δ, if the number of grid points contained in the connected domain with the largest area is less than 99%, the threshold Δ is increased by 1, and steps 1 to 2 are repeated until the number of grid points contained in the connected domain with the largest area accounts for more than 99% of the entire map. The threshold at this time is the benchmark threshold Δ min , except for the points included in this connected domain, all other points are considered as abnormal points;
[0048] Step 4: Statistical analysis of outliers
[0049] Based on the reference threshold Δ min At the beginning, the threshold is increased by 1 each time, and steps 1 to 2 are repeated to count the number of connected domains and abnormal points under each threshold until there is only one connected domain in the whole image. At this time, the corresponding threshold is Δmax;
[0050] Step 5: Flying point determination
[0051] The statistical threshold is Δ min ~Δ max When the range is reached, the inspection results of the number of connected domains and the number of abnormal points corresponding to each threshold are obtained, and the proportion of each number of connected domains and the number of abnormal points to the total number of points is statistically analyzed to determine the flying points.
[0052] The specific judgment principle is to choose one of the following two principles:
[0053] 1) Based on the ratio of abnormal points to the total number of points, the specific determination method is as follows:
[0054] According to the threshold Δ min ~Δ max The ratio of abnormal points to the total number of points corresponding to each threshold is calculated, and the abnormal points with a ratio less than the specified ratio are determined as flying points. The specified ratio is one ten-thousandth of the number of abnormal points to the total number of points. For example, in Table 1, when the threshold Δ=10, the ratio of abnormal points to the total number of points is 0.0376‰, which is less than one ten-thousandth, that is, 0.0376‰<0.1‰, so the 24 abnormal points under the threshold Δ=10 are all flying points.
[0055] 2) Flying point determination based on threshold setting based on artificial experience. The specific method is based on artificial experience, and the threshold setting range for determining abnormal points as flying points is summarized. According to the different map terrains, the threshold range summarized is also different. The specific terrain type and the threshold setting range are: the elevation difference threshold in plain terrain is 0-2, the elevation difference threshold in hilly terrain is 3-6, the elevation difference threshold in mountainous terrain is 7-25, and the elevation difference threshold in high mountain terrain is 26-90. Points outside this elevation difference threshold range are flying points.
[0056] The reference range of the threshold is set according to the terrain. For example, the artificial reference threshold range for mountain terrain in Table 1 is 6-25. When the threshold Δ=9 is set, all 85 abnormal points under the current threshold are determined to be flying points.
[0057] In order to verify the effectiveness and accuracy of the method proposed in this paper, an experimental verification was carried out. In the experiment, DEM data was selected, the elevation difference threshold was set, and the program was run for detection. The results show that the new research method can detect flying points in DEM data, and the detection results are consistent with the results of manual experience inspection.
[0058] Table 1 Statistics of the ratio of mountain threshold to abnormal points and total number of points
[0059]
[0060] As shown in Table 1, the threshold of the abnormal point test of the DEM data in this area is 6-14, which is consistent with the artificial threshold experience of 6-25 for the elevation value threshold difference in mountainous terrain; when the abnormal point ratio is less than 0.1‰, it is judged as a flying point, that is, when the threshold Δ=10, the abnormal point accounts for 0.04‰ of the total number of points, then all abnormal points within this range are judged as flying points. The specific abnormal point test effect diagram of mountainous terrain is shown in the figure below. Figure 6 The statistical analysis is shown in Figure Figure 7 shown.
[0061] Table 2 Statistics of the ratio of hill threshold to abnormal points and total number of points
[0062]
[0063]
[0064] As shown in Table 2, the threshold of the abnormal point test of the DEM data in this area is 2-5, which is consistent with the artificial threshold experience of the elevation value threshold difference of 2-6 in hilly terrain. When the abnormal point ratio is less than 0.1‰, it is judged as a flying point, that is, when the threshold Δ=3, the abnormal point accounts for 0.05‰ of the total number of points, then all abnormal points in this range are judged as flying points. The specific abnormal point test effect diagram of hilly terrain is shown in the figure below. Figure 8 The statistical analysis is shown in Figure Fig. 9 shown.
[0065] Table 3 Statistics of the ratio of flat ground threshold to abnormal points and total number of points
[0066]
[0067] As shown in Table 3, the threshold of the abnormal point in the DEM data test of this area is 2-3, and the artificial threshold experience of the elevation value threshold difference in flat terrain is 0-2. At this time, the abnormal point with a threshold of 3 is determined as a flying point. When the proportion of abnormal points is less than 0.1‰, it is determined to be a flying point, that is, when the threshold Δ=2, the abnormal points account for 0.05‰ of the total number of points, then all abnormal points within this range are determined to be flying points. The specific abnormal point test effect diagram of flat terrain is shown in the figure below. Fig.10 The statistical analysis is shown in Figure Fig.11 shown.
[0068] Table 4 Statistics of the ratio of high mountain threshold to abnormal points and total number of points
[0069]
[0070]
[0071] As shown in Table 4, 1) when calculating the reference connected domain, if the threshold Δ=8, the connected domain that meets the maximum number of grid points accounts for more than 99% of the total number of points, and this is used as the reference connected domain.
[0072] 2) Check the threshold value set according to manual experience, and determine that the points beyond the threshold reference value range are flying points. For example, the elevation difference threshold in high mountains is generally 26-90. If the threshold Δ=26 is set, all abnormal points within this range are determined to be flying points.
[0073] 3) According to the DEM data quality inspection requirements, the outliers are judged as flying points if they are less than 0.1‰. For example, when the threshold Δ=21, the outliers account for 0.08‰ of the total number of points, and all outliers within this range are judged as flying points. Figure 4 The statistical analysis is shown in Figure Figure 5 shown.
[0074] According to the above test results, it can be seen that the present invention can be applied to all existing terrain types. For example, in flat terrain, it is difficult to detect the slight differences in flat terrain by traditional manual experience inspection, while the 8-neighborhood minimum elevation difference in this algorithm can calculate the outliers in the minimum range of 8 neighborhoods, so the inspection accuracy is greatly improved. In addition, in the test process, for batch maps of the same terrain, such as 128 experimental data, after setting a specified threshold or specifying the proportion of outliers to the total number of points, the algorithm checks the batch maps one by one, and finally obtains the statistical analysis results of the number of flying points. The algorithm checks the flying point determination of batch maps, which can not only ensure the accuracy of the flying point determination results, but also improve the inspection efficiency, saving a lot of manpower and time. In actual application scenarios, it has also been used on a small scale and has been unanimously recognized by users.
[0075] When checking flying points in DEM images, the area connected by flying points can be regarded as a connected domain according to the different elevation difference thresholds. Multiple flying points constitute multiple different connected domains, and each connected domain can be represented as an independent object or area. In software image processing, by performing flying point analysis on the image, its elevation difference, number of flying points, flying point ratio and other features can be calculated, and further processing and analysis can be performed.
[0076] Specifically, the connected domain analysis in this experiment includes the following:
[0077] 1: Image conversion: Convert DEM data into a visual grayscale image, such as Figure 4 , Figure 6 , Figure 8 , Fig.10 Grayscale image of
[0078] 2: Outlier Marking: Traverse each pixel in the image and mark the pixels that are judged as outliers with special colors, such as Figure 4 , Figure 6 The red part in the effect diagram represents the abnormal point connected domain formed by the abnormal points.
[0079] 3: Flying point rate analysis: For each connected domain, its features such as the number of connected domains and the number of abnormal points can be calculated, and a comprehensive analysis of the proportion of abnormal points to the total number of points under different thresholds, i.e., the flying point rate, can be performed.
[0080] Comprehensive test results, such as Figure 5 It is the relationship diagram between the high mountain threshold and the ratio of abnormal points to the total number of points. The thresholds Δ=25 to 90 or the ratio of abnormal points to the total number of points is less than 0.1‰, which are all considered as flying points. Figure 6 It is the relationship diagram between the mountain threshold and the ratio of abnormal points to the total number of points. The thresholds between Δ=6~25 or the ratio of abnormal points to the total number of points is less than 0.1‰, which are all judged as flying points. Figure 7In the relationship diagram between the hill threshold and the ratio of abnormal points to the total number of points, the reference threshold Δ=2 to 6 or the ratio of abnormal points to the total number of points is less than 0.1‰, which is determined as a flying point; Figure 8 This is a relationship diagram between the flat ground threshold and the ratio of abnormal points to the total number of points. Points within the reference threshold range of Δ=2 or with a ratio of abnormal points to the total number of points less than 0.1‰ are judged as flying points.
Claims
1. A DEM flying point detection method based on connected domain judgment, characterized in that The steps include: Step 1: Calculate the minimum elevation difference of 8 neighborhoods; Calculate the minimum elevation difference of the 8-neighborhood grid point. The connectivity determination principle is: point P c As the center, calculate P c The 8 adjacent points The elevation difference, 1≤x≤8, if P c and If the difference is less than or equal to the threshold Δ, then P c and Under the threshold Δ, it is connected. Otherwise, if P c and If the difference is greater than the threshold Δ, then P c and It is disconnected under the threshold Δ; Step 2: Solve the connected domain based on the threshold; Take the DEM data as the grid point elevation difference matrix, take the threshold Δ as the judgment value, and solve each connected domain in the grid point elevation difference matrix in a breadth-first or depth-first manner according to the connectivity judgment principle in step 1, and count the number of connected domains under the threshold Δ and the number of points contained in each connected domain; Step 3: Baseline threshold selection; Starting from the threshold Δ=2, we get the number of connected domains and the number of points contained in each connected domain when the threshold is Δ. Under a certain threshold Δ, if the number of grid points contained in the connected domain with the largest area is less than a%, then the threshold Δ is increased by 1, and steps 1 to 2 are repeated until the number of grid points contained in the connected domain with the largest area accounts for more than a% of the entire map. At this time, the threshold is the benchmark threshold Δ min , except for the points included in this connected domain, all other points are considered as abnormal points; Step 4: Statistical analysis of outliers; Based on the reference threshold Δ min At the beginning, the threshold is increased by 1 each time, and steps 1 to 2 are repeated to count the number of connected domains and abnormal points under each threshold until there is only one connected domain in the whole image. At this time, the corresponding threshold is Δmax; Step 5: Flying point determination; The statistical threshold is Δ min ~Δ max When the range is reached, the inspection results of the number of connected domains and the number of abnormal points corresponding to each threshold are obtained, and the proportion of each number of connected domains and the number of abnormal points to the total number of points is statistically analyzed to determine the flying points.
2. The DEM flying point detection method based on connected domain judgment according to claim 1 is characterized in that: The percentage a% takes a value of 99%.
3. The DEM flying point detection method based on connected domain judgment according to claim 1 is characterized in that: The specific judgment principles in step 5 are: The specific method for determining flying points based on the ratio of abnormal points to the total number of points is as follows: According to the threshold Δ min ~Δ max The ratio of abnormal points to the total number of points corresponding to each threshold is calculated, and the abnormal points with a ratio less than the specified ratio are determined as flying points. The specified ratio is one ten-thousandth of the number of abnormal points to the total number of points. For example, in Table 1, when the threshold Δ=10, the ratio of abnormal points to the total number of points is 0.0376‰, which is less than one ten-thousandth, that is, 0.0376‰<0.1‰, so the 24 abnormal points under the threshold Δ=10 are all flying points.
4. The DEM flying point detection method based on connected domain judgment according to claim 1 is characterized in that: The specific judgment principles in step 5 are: The flying point determination based on setting the threshold value based on artificial experience is specifically based on artificial experience, and the setting threshold range for determining abnormal points as flying points is summarized. According to the different map terrains, the specific terrain type and the setting threshold range are: the elevation difference threshold in plain terrain is 0-2, the elevation difference threshold in hilly terrain is 3-6, the elevation difference threshold in mountainous terrain is 7-25, and the elevation difference threshold in high mountainous terrain is 26-90. Points outside this elevation difference threshold range are flying points.
5. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, and the program codes can be called by a processor to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for identifying deformation type diseases of pavement
CN107633516A
Integrated detection and restoration method for solving problems of flying spots and spot density of road network data
CN110619134A
Detection method for abnormal value of digital elevation model
CN118334281A
Abnormal value detection apparatus for satellite positioning system, abnormal value detection method, and abnormal value detection program
US20110227786A1
Remote sensing method to model terrain shape by detecting reliable ground points
US20210104182A1