Efficient and accurate multi-candidate viewpoint filtering algorithm for terrain vision field point selection
By extracting the relative elevation and clustering algorithm of terrain files in multi-viewpoint planning, calculating the WCOM value of the viewpoint and optimizing the viewpoint selection, the problem of increasing computing resources and time requirements in the existing technology is solved, and efficient and accurate field of view is achieved. Analysis, suitable for multi-view planning.
Patent Information
- Application Number
- CN202410597693.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2025-01-07
AI Technical Summary
In the multi-view planning, as the resolution of terrain files increases, the computing resources and time requirements increase, incremental strategies lead to inaccurate visual analysis, filtering strategies affect performance during viewpoint filtering and unstable visual analysis results. .
By reading the digital surface model, candidate feature points are extracted relative elevation, cluster clustering is used using ECKM algorithm and K-mean algorithm, WCOM value is calculated, and the coverage contribution points and overlapping contribution points are combined, cluster filtering is used using the minimum heap to optimize the viewpoint. choose.
It realizes efficient and accurate multi-candidate viewpoint filtering, improves the accuracy and stability of field of view analysis, and provides an efficient and reliable multi-viewpoint planning solution suitable for environmental research, urban planning and communications fields.
Smart Images

Figure CN119273950A_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a high-efficiency and accurate multi-candidate viewpoint filtering algorithm for terrain viewpoint selection, and relates to the fields of viewpoint analysis and space optimization. Background Art
[0002] With the development of viewshed algorithms, visibility analysis has become an important pillar of the study of human interaction with the surrounding environment in the field of GIS (Geographic Information System). The scope of application of visibility analysis usually depends on the content of the input data source. If it only contains terrain file information, it mainly involves problems such as site selection, archaeology, and urban planning. If the input data source contains both terrain files and viewpoint attribute information, it usually involves visual assessment, real estate forecasting, communications, and other fields.
[0003] In recent years, the methods for solving the multi-viewpoint problem can be divided into two categories. The first category is to use the parallel computing power of GPU, Apache Spark's multi-level distributed technology, and intelligent algorithms to analyze the view of a large number of viewpoints based on terrain files. The second category is to select characteristic terrain points as candidate viewpoints based on terrain files. Usually, the candidate viewpoints are selected as mountain peaks to determine the candidate viewpoints. Based on the candidate viewpoints, there are two implementation strategies. The first is the incremental strategy, which adds viewpoints one by one by defining rules and finally determines the viewpoint set. For example, Zhang et al. regarded it as a submodular set function maximization problem and developed four different models to meet the actual needs of the expansion process. The second strategy is the filtering strategy. After calculating the candidate points as a whole, a filtering algorithm is designed to filter the candidate points until they meet the requirements. For example, Wang et al. proposed the CVF algorithm to cluster the candidate points, sort the viewpoints in the cluster according to the IVC index, and filter the viewpoints by comparing with the viewpoints of adjacent clusters.
[0004] In summary, as the resolution of terrain files increases, the amount of data that the first type of algorithm needs to process will increase exponentially, requiring more computing resources and time. Although the incremental strategy in the second type of algorithm can add candidate viewpoints one by one to determine the final viewpoint set, it cannot measure the viewshed contribution of the viewpoint from a macroscopic perspective, which may lead to inaccurate viewshed analysis results. Regarding the filtering strategy, the CVF algorithm is superior to other algorithms in terms of computational efficiency and coverage, but the algorithm performs a large amount of viewshed calculations during the viewpoint filtering process, which affects the overall performance. In addition, when updating clusters, the CVF algorithm does not consider the impact of deleting and adding viewpoints on the overall coverage and overlap rate of the cluster, which may lead to instability in the viewshed analysis results. Summary of the invention
[0005] The purpose of the present invention is to provide an efficient and accurate multi-candidate viewpoint filtering algorithm for terrain viewpoint selection to achieve multi-viewpoint space optimization.
[0006] To achieve the above object, the present invention provides the following steps:
[0007] Step A: Read the digital surface model DSM of the study area to obtain terrain reference parameter information;
[0008] Step B: Perform neighborhood analysis on the DSM grid data, perform differential processing between the result grid and the original DSM to obtain relative elevation, and extract candidate feature points based on the relative elevation;
[0009] Step C: The ECKM algorithm is used to determine the initial cluster center through computational geometry. Based on the initial cluster center, the K-mean algorithm is used to update the cluster using the Euclidean distance as the metric. The observation points are clustered into different clusters, and the viewpoint with the highest view contribution is selected as the final retained viewpoint.
[0010] Step D: Calculate the WCOM value of each candidate point according to formula (1-3), and compare the corresponding grid value of the candidate point's visible area and the total visible area in the cluster, and split the visible point into coverage contribution points and overlapping contribution points;
[0011] Step E: Store the candidate points in a minimum heap, pop the top value from the currently analyzed cluster, compare the value with the adjacent cluster, and if the value is smaller than the value in the adjacent cluster, continue to pop the next top value; otherwise, insert the value into the adjacent cluster and set the cluster as the current operation cluster until each cluster meets the termination condition.
[0012] Furthermore, extracting candidate feature points relative to elevation specifically includes the following steps:
[0013] Step B1: Based on the parameters of the terrain file such as the number of grid points, resolution, and visible radius, select an appropriate scale to divide the terrain into multiple rectangular areas;
[0014] Step B2: Using the selected scale, perform neighborhood analysis on each grid point in the terrain file to obtain the average value of the surrounding area, and perform differential processing between the original terrain file and the terrain file after the average value is obtained to obtain a relative elevation terrain file;
[0015] Step B3: Determine the viewshed candidate points according to the point corresponding to the maximum relative elevation value in each rectangular area at the selected scale.
[0016] Furthermore, the candidate point clustering process specifically includes the following steps:
[0017] Step C1: Construct a Voronoi diagram using candidate points, and then find the candidate point closest to each vertex in the Voronoi diagram, and construct empty circles based on these distances. The empty circles are sorted in non-increasing order of radius length, and the points that intersect with the candidate points are selected as the initial cluster centers;
[0018] Step C2: Use the K-mean algorithm to cluster the candidate points and update the clusters by Euclidean distance. The update process terminates when the cluster center no longer changes or reaches a certain number of iterations.
[0019] Step C3: After clustering is completed, the final cluster center is determined using the empty circle method to identify adjacent clusters. The final determined empty circles are sorted in non-decreasing order of radius length, and the clusters represented by candidate points on the same empty circle are regarded as adjacent clusters.
[0020] Furthermore, calculating the candidate point WCOM, the coverage contribution point, and the overlap contribution point specifically includes the following steps:
[0021] Step D1: Assume that the number of rows and columns of the pixels in the study area is M and N, and each pixel is uniquely identified by its row index i and column index j, where 1≤i≤M, 1≤j≤N.
[0022] Step D2: Define the visible area array a as an M×N two-dimensional array, which represents the visibility of each pixel in the study area. If the pixel (i, j) is visible, then a ij =1, otherwise a ij =0.
[0023] Step D3: Define the total view array b in the cluster as an M×N two-dimensional array, which represents the total number of views of each pixel in the study area. If the pixel (i, j) is visible to I viewpoints in the cluster, then b ij =I.
[0024] Step D4: Define the coverage contribution point set CC to represent the set of points that meet the conditions, that is, the set of point indices whose values of the corresponding positions in a and b are equal to 1, as shown in formula (1):
[0025] CC={(i,j)∣1≤i≤m,1≤j≤n,a ij =1,b ij =1} (1)
[0026] Step D5: Define the overlapping contribution point set OC to represent the set of points that meet the conditions, that is, the set of point indexes that meet the conditions that the value of the corresponding position in a is equal to 1 and the value of the corresponding position in b is greater than 1, and the definition is shown in formula (2):
[0027] OC={(i,j)∣1≤i≤m,1≤j≤n,a ij=1,b ij >1} (2)
[0028] Step D6: The present invention proposes a new evaluation viewpoint index WCOM formula as shown in formula (3-5):
[0029] Coverage=|CC| (3)
[0030] Overlap=|OC| (4)
[0031] F=w1×Coverage-w2×Overlap (5)
[0032] Among them, w1 and w2 are the weights of the number of coverage points Coverage and the number of overlapping points Overlap respectively.
[0033] Furthermore, the intra-cluster sorting and cluster filtering specifically include the following steps:
[0034] Step E1: Pop the top element value of the current operation cluster from the heap and compare it with the wcom value of the top element of the adjacent cluster. If the WCOM value of the current viewpoint is greater than the top element of the adjacent cluster, insert it into the adjacent cluster and convert it into an operation cluster; if it is less than, continue to pop the top element until only one candidate point is left in each cluster.
[0035] Step E2: When it is necessary to delete a viewpoint in a cluster, the total field of view of the cluster must be updated first, and then the intersection of the overlapping contribution point set OC of the deleted element and the point whose value in the total field of view array of the cluster is 1 is calculated and recorded as D; then, the remaining candidate viewpoints in the cluster are traversed, and the intersection of each viewpoint OC and D is deleted from OC and merged into the coverage contribution point set CC.
[0036] Step E3: When a point needs to be added, the total field of view of the cluster also needs to be updated; during the insertion operation, since the point is separated from the original cluster, its coverage and overlap contributions lose their meaning; therefore, the overlapping contribution point set OC and the coverage contribution point set CC of the point are both regarded as visible points, and then the coordinate point set U with a value of 2 in the total field of view array corresponding to the visible point set is calculated, and the remaining viewpoints in the cluster are traversed; the intersection of viewpoint CC and U is deleted from CC, and then merged into the coverage contribution point set OC.
[0037] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0038] The efficient and precise multi-candidate viewpoint filtering algorithm EVP (Efficient Precise Viewshed Point Selection) for terrain viewshed point selection proposed in the present invention has demonstrated excellent performance in multi-viewpoint planning; based on the features of the terrain file, we determined the candidate viewpoints and effectively clustered these candidate viewpoints using the ECKM algorithm; by proposing the WCOM evaluation index, we can comprehensively evaluate the contribution value of the candidate viewpoints and perform precise viewpoint screening through the filtering algorithm to maximize the optimization of the viewshed analysis results; therefore, the EVP algorithm provides an efficient and reliable solution for multi-viewpoint planning, which has important application value in environmental research, urban planning, communications, military strategy and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is the overall framework flow chart of the method of the present invention;
[0041] Figure 2 Schematic diagram of three types of terrain features in the dataset;
[0042] Figure 3 It is the flow chart of EVP algorithm;
[0043] Figure 4 It is the pseudo code of EVP algorithm;
[0044] Figure 5 To compare the running time of different observation points using SA, CVF and EVP algorithms respectively;
[0045] Figure 6 To compare the coverage of different observation points using SA, CVF and EVP algorithms;
[0046] Figure 7 Comparison of the total view obtained by different algorithms on the D_plain dataset. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The purpose of the present invention is to provide an efficient and accurate multi-candidate viewpoint filtering algorithm for terrain viewpoint selection to achieve multi-viewpoint space optimization.
[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0050] The present invention provides an efficient and accurate multi-candidate viewpoint filtering algorithm EVP (Efficient Precise Viewshed Point Selection) for terrain viewshed point selection. Figure 1 The algorithm framework flow chart provided by the present invention includes:
[0051] Step S1: Extract candidate points based on relative elevation.
[0052] Step S1 specifically includes:
[0053] Step S11: The Copernicus Global Digital Elevation Models DSM dataset of multiple terrain features with a terrain resolution of 30 m and a pixel size of 3600×3600 is obtained from https: / / opentopography.org.
[0054] In this step, the DSM raster data is read through the GDAL library, and its outliers are processed to ensure that there are no null values in the data and the maximum and minimum values do not exceed the given threshold range.
[0055] Step S12: In ArcGIS Pro 3.0.2, bilinear interpolation is used to resample the resolution to 5m and the number of pixels is adjusted to 1000*1000 using the clipping grid; the three data sets used in the present invention correspond to plains, hills, and mountains, respectively, and are named D_plain, D_hilly, and D_mountain. Figure 2 As shown, (a) represents D_plain, (b) represents D_hilly, and (c) represents D_mountain. The detailed description of the specific terrain parameters is shown in Table 1. It is assumed that the visible radius of each viewpoint is 40 grids (about 200m).
[0056] Table 1 Dataset specific parameters
[0057] Datesets D_plain D_hilly D_mountain Grid cells 1000×1000 1000×1000 1000×1000 Maximum elevation(m) 64.5885 263.371 1340.34 Minimum elevation(m) 43.2606 128 981.365 Median elevation(m) 44.908012 165.78625 1041.0295 West longitude(deg) -62.000139 106.999861 68.999861 East longitude(deg) -61.953843 107.046157 69.046157 North latitude(deg) 1.000139 22.046435 36.046435 South latitude(deg) 0.953843 22.000139 36.000139
[0058] Step S13: After performing neighborhood analysis on the digital surface model (DSM), the obtained analysis result grid is differentially processed with the original DSM to obtain relative elevation information; by comparing the difference between the result after neighborhood analysis and the elevation value of the original DEM, the local changes of the terrain are highlighted, and then potential terrain feature points are determined, and based on these relative elevation information, candidate feature points are further extracted.
[0059] Step S2: Use the ECKM algorithm to determine the initial cluster center.
[0060] Step S2 specifically includes:
[0061] Step S21: For the candidate feature points, the convex hull and Thiessen polygons formed by them are first calculated. In order to ensure that all analysis points are inside the study area, only the Thiessen polygon vertices inside the convex hull are retained.
[0062] Step S22: Calculate the distance between the Thiessen polygon vertices and the candidate feature points, and sort them based on the distance.
[0063] Step S23: locate empty circles among all candidate points and their corresponding radii, and sort multiple empty circles in non-increasing order based on the length of the radius. The common point between the empty circle and the candidate point is the initial cluster center. The number of initial cluster centers is determined by the actual situation.
[0064] Step S3: Start clustering and determine adjacent clusters.
[0065] Step S3 specifically includes:
[0066] Step S31: For the initial cluster center, calculate the Euclidean distance between the current data point and the cluster center, and assign the data point to the nearest cluster center based on the distance to initialize the cluster.
[0067] Step S32: Set the maximum number of iterations M and the threshold T, use the K-mean algorithm to distribute the average value of the points and update the cluster center. When the number of iterations exceeds M or the change in the cluster center is greater than T, stop updating.
[0068] Step S33: sorting the finally determined empty circles in non-decreasing order of radius length, and clusters represented by candidate points on the same empty circle are regarded as adjacent clusters.
[0069] Step S4: Calculate the candidate point WCOM and record the coverage contribution point set and the overlap contribution point set.
[0070] Step S4 specifically includes:
[0071] Step S41: traverse all clusters and calculate the total view array in cluster i, recorded as B i .
[0072] In this step, the XPDERL algorithm is used to calculate the viewshed of each candidate point in the cluster, and the visibility array of each point is returned and recorded as A. ij The range of the visibility array is determined by its visible radius R, which does not match the scale of the research area represented by the total viewing area array; therefore, it is necessary to first expand the Aij array to the scale within the research range and keep the relative position of the visible points unchanged, and then sum the visibility arrays of the candidate points in the cluster after expansion to obtain B i , the Bi calculation formula is as follows:
[0073]
[0074] Where n i represents the number of candidate points in cluster i, and trans represents A ij Array extension operations.
[0075] Step S42: for the current working cluster, iterate the candidate points in the cluster and calculate the CC coverage contribution point set and the OC overlap contribution point set based on formula (1-2), and calculate the WCOM of the point by the number of set elements of CC and OC.
[0076] Step S5: Sort the candidate points based on wcom and store them as a minimum heap.
[0077] In this step, after the candidate points wcom are sorted, the index values before and after the sorting need to be recorded. According to the index, the coordinate points, CC, and OC of the candidate points are also adjusted in order to maintain the corresponding relationship.
[0078] Step S6: Filter low WCOM candidate points, filtering algorithm flow Figure 3 The corresponding parameters of the algorithm flow chart are shown in Table 2, and the pseudo code is as follows Figure 4 .
[0079] Step S6 specifically includes:
[0080] Step S61: traverse the cluster and determine whether the number of candidate points in the cluster requires the number of viewpoints to be retained to be O. If len(Bi)>O, the cluster is regarded as the current working cluster, otherwise it is skipped.
[0081] Step S62: For the cluster, first pop the top viewpoint of the stack and calculate its visibility array, and at the same time update the OC and CC of the remaining viewpoints in the cluster.
[0082] In this step, after the viewpoint is popped up, the total view array B in the cluster is updated i =B i -A ij, then calculate the intersection of the overlapping contribution point set OC of the deleted elements and the point whose total view array value of the cluster is 1, and record it as D; then, traverse the remaining candidate viewpoints in the cluster, delete the intersection of each viewpoint OC and D from OC, and merge it into the coverage contribution point set CC, and update the WCOM of the point at the same time.
[0083] Step S63: Set the ratio parameter P and traverse the adjacent clusters C n If the current viewpoint WCOM is greater than the top viewpoint of the adjacent cluster, then further check whether it is greater than the len(C n )*P is the largest viewpoint WCOM. If it is larger than , the viewpoint is inserted into the adjacent cluster, the adjacent cluster is updated and regarded as the working cluster; otherwise, the next adjacent cluster is iterated.
[0084] In this step, after inserting the viewpoint, update the total view array B in the cluster i =B i +A ij , regard the overlapping contribution point set OC and the coverage contribution point set CC of the point as visible points; find the coordinate point set U in the visible point set corresponding to the value of 2 in the total field of view array, and traverse the remaining viewpoints in the cluster; delete the intersection of viewpoint CC and U from CC, and then merge it into the coverage contribution point set OC, and update the WCOM of the point at the same time.
[0085] Step S64: loop through each cluster until the number of candidate points in the cluster is equal to 0, then the filtering ends.
[0086] Table 2 EVP algorithm process parameter description
[0087] parameter Parameter description N Number of clusters p Operational Viewpoint <![CDATA[H d ]]> Current Operation Cluster <![CDATA[H k ]]> Adjacent comparison cluster k Adjacent Comparison Cluster Index d Current operation cluster index <![CDATA[N d ]]> The number of candidate points with cluster index d <![CDATA[S d ]]> Operate the WCOM value of the top element of the cluster's minimum heap <![CDATA[S k ]]> WCOM value of the top element of the adjacent cluster minimum heap <![CDATA[V c ]]> The viewport array of the operating viewpoint <![CDATA[V d ]]> Total view array in the current operation cluster N The number of neighboring clusters of the current cluster <![CDATA[P oc ]]> Overlapping contribution point set of operation viewpoints <![CDATA[P cc ]]> Coverage contribution point set of operation viewpoints <![CDATA[P jo ]]> The remaining viewpoints overlap the contribution point set <![CDATA[P jc ]]> The remaining viewpoints cover the contribution point set
[0088] In order to better achieve the effect of the present invention, the following experiment was performed:
[0089] The algorithm of the present invention is implemented using Python 3.7. The CPU of the experimental test computer is Intel(R) Core(TM) i7-10875H CPU@2.30GHz, the memory is 16G, and the operating system is 64-bit Windows10.
[0090] Running time and view coverage are key factors in evaluating the effectiveness of the candidate point filtering algorithm, so they are regarded as algorithm evaluation indicators. The performance and efficiency of the EVP algorithm are verified by testing the performance of the algorithm in processing different terrain environments, the number of candidate feature points, and retaining different numbers of viewpoints. The number of retained feature points is set to 20% of the candidate viewpoints, and the test results are shown in Table 3:
[0091] Table 3 Running time and view coverage of EVP algorithm
[0092]
[0093] As can be seen from Table 3, in the three different terrains, as the number of candidate viewpoints increases, the running time also gradually increases. For example, for the D_mountain dataset, when the candidate viewpoints increase from 900 to 3250, the running time increases from 276 seconds to 1,212 seconds, which reflects the increased computational complexity of the algorithm when processing larger-scale data. In all terrain types, the increase in the number of retained viewpoints is generally positively correlated with the coverage rate. For example, in the D_mountain dataset, when the number of retained viewpoints increases from 45 to 320, the coverage rate increases from 0.218525 to 0.742622. This shows that in the viewpoint selection strategy, retaining a higher number of viewpoints helps to achieve wider area coverage. The more viewpoints are retained under the same candidate point, the higher the coverage rate and the shorter the running time. This is because when the number of retained viewpoints is the same as the number of clusters, as the number of clusters increases, the reduction in the number of points in each cluster will lead to a corresponding reduction in the processing time of each cluster, and the time complexity of heap operations is usually proportional to the logarithm of the number of elements. Reducing the number of elements in a cluster will significantly improve performance.
[0094] In order to compare the performance and efficiency of the EVP (Efficient Precise Viewshed Point Selection) algorithm with other algorithms, this experiment compares the running time and viewshed coverage of the EVP algorithm and the CVF (Candidate Viewpoints Filtering) and SA (Simulated Annealing) algorithms. Figure 5 As shown, (a) is D_plain; (b) is D_hilly; (c) is D_mountain. In the data sets of the three terrain types, as the number of candidate viewpoints increases, the EVP algorithm as a whole shows a very low running time compared to the SA and CVF algorithms. Figure 6 It can be seen that the coverage is positively correlated with the number of retained viewpoints, and this trend is reflected in all algorithms. It is worth noting that our algorithm can achieve a relatively high coverage in a shorter running time. In contrast, the coverage of the SA algorithm is the most limited.
[0095] In order to show the results more intuitively, take D_plain as an example (such as Figure 7 ), where (a) is the SA algorithm; (b) the CVF algorithm; (c) the EVP algorithm, setting the candidate feature points to 2116 and retaining the viewpoints to 210. It can be found that since the visible area of the retained single viewpoint is not blocked by too much terrain and the multiple viewpoints are evenly distributed, the visible area of the EVP algorithm is the largest (the highest number of coverage points is 6) and the overlap rate is the smallest.
[0096] In summary, our algorithm has achieved excellent performance in terms of computational efficiency, coverage and other performance indicators. Therefore, the EVP algorithm provides an efficient and reliable solution for multi-viewpoint planning, which has important application value in environmental research, urban planning, communications, military strategy and other fields.
[0097] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and scope of application. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. An efficient and accurate multi-candidate viewpoint filtering algorithm for terrain viewpoint selection, characterized in that: include: Step A: Read the digital surface model DSM of the study area to obtain terrain reference parameter information; Step B: Perform neighborhood analysis on the DSM raster data, perform differential processing between the result raster and the original DEM to obtain relative elevation, and extract candidate feature points based on the relative elevation; Step C: The ECKM algorithm is used to determine the initial cluster center through computational geometry. Based on the initial cluster center, the K-mean algorithm is used to update the cluster using the Euclidean distance as the metric. The observation points are clustered into different clusters, and the viewpoint with the highest view contribution is selected as the final retained viewpoint. Step D: Calculate the WCOM values of all candidate points in the cluster according to formula (1-3), compare the grid values corresponding to the candidate point visual area and the total visual area in the cluster, and split the visible points into coverage contribution points and overlapping contribution points; Step E: Store the candidate points in a minimum heap, pop the top value from the currently analyzed cluster and compare it with the adjacent cluster. If the value is smaller than the value in the adjacent cluster, continue to pop the next top value; Otherwise, the value is inserted into the adjacent cluster and the cluster is set as the current operation cluster until each cluster meets the termination condition.
2. According to claim 1, an efficient and accurate multi-candidate viewpoint filtering algorithm for terrain viewpoint selection is characterized in that: The candidate feature points extracted by relative elevation include: Step B1: Based on the parameters of the terrain file such as the number of grid points, resolution, and visible radius, an appropriate scale is selected to divide the terrain into multiple rectangular areas; Step B2: Using the selected scale, perform neighborhood analysis on each grid point in the terrain file to obtain the average value of the surrounding area, and perform differential processing between the original terrain file and the terrain file after the average value is obtained to obtain a relative elevation terrain file; Step B3: Determine the viewshed candidate points according to the point corresponding to the maximum relative elevation value in each rectangular area at the selected scale.
3. The efficient and accurate multi-candidate viewpoint filtering algorithm for terrain viewpoint selection according to claim 1 is characterized in that: The candidate point clustering process specifically includes: Step C1: Construct a Voronoi diagram using candidate points, and then find the candidate point closest to each vertex in the Voronoi diagram, and construct empty circles based on these distances. The empty circles are sorted in non-increasing order of radius length, and the points that intersect with the candidate points are selected as the initial cluster centers; Step C2: Use the K-mean algorithm to cluster the candidate points and update the clusters by Euclidean distance. The update process terminates when the cluster center no longer changes or reaches a certain number of iterations. Step C3: After clustering is completed, the empty circle method is used to determine the final cluster center to identify adjacent clusters. Different from the step of determining the initial cluster center, the final empty circles are sorted in non-decreasing order of radius length, and the clusters represented by candidate points on the same empty circle are regarded as adjacent clusters.
4. The efficient and accurate multi-candidate viewpoint filtering algorithm for terrain viewpoint selection according to claim 1, characterized in that: Calculation of candidate point WCOM, coverage contribution point, and overlap contribution point specifically includes: Step D1: Assume that the number of rows and columns of the pixels in the study area is M and N, and each pixel is uniquely identified by its row index i and column index j, where 1≤i≤M, 1≤j≤N. Step D2: Define the visible area array a as an M×N two-dimensional array, which represents the visibility of each pixel in the study area. If the pixel (i, j) is visible, then a ij =1, otherwise a ij =0. Step D3: Define the total view array b in the cluster as an M×N two-dimensional array, which represents the total number of views of each pixel in the study area. If the pixel (i, j) is visible to I viewpoints in the cluster, then b ij =I. Step D4: Define the coverage contribution point set CC to represent the set of points that meet the conditions, that is, the set of point indices whose values of the corresponding positions in a and b are equal to 1, as shown in formula (1): CC={(i,j)∣1≤i≤m,1≤j≤n,a ij =1,b ij =1} (1) Step D5: Define the overlapping contribution point set OC to represent the set of points that meet the conditions, that is, the set of point indexes that meet the conditions that the value of the corresponding position in a is equal to 1 and the value of the corresponding position in b is greater than 1, and the definition is shown in formula (2): OC={(i,j)∣1≤i≤m,1≤j≤n,a ij =1,b ij >1} (2) Step D6: The present invention proposes a new evaluation viewpoint index WCOM formula as shown in formula (3-5): Coverage=|CC| (3) Overlap=|OC| (4) F=w1×Coverage-w2×Overlap (5) Among them, w1 and w2 are the weights of the coverage area and overlap area respectively.
5. The efficient and accurate multi-candidate viewpoint filtering algorithm for terrain viewpoint selection according to claim 1, characterized in that: Intra-cluster sorting and cluster filtering specifically include: Step E1: Pop the top element value of the current operation cluster from the heap and compare it with the wcom value of the top element of the adjacent cluster. If the WCOM value of the current viewpoint is greater than the top element of the adjacent cluster, insert it into the adjacent cluster and convert it into an operation cluster; if it is less than, continue to pop the top element until only one candidate point is left in each cluster. Step E2: When it is necessary to delete a viewpoint in a cluster, the total field of view of the cluster must be updated first, and then the intersection of the overlapping contribution point set OC of the deleted element and the point whose value in the total field of view array of the cluster is 1 is calculated and recorded as D; then, the remaining candidate viewpoints in the cluster are traversed, and the intersection of each viewpoint OC and D is deleted from OC and merged into the coverage contribution point set CC. Step E3: When a point needs to be added, the total field of view of the cluster also needs to be updated; during the insertion operation, since the point is separated from the original cluster, its coverage and overlap contributions lose their meaning; therefore, the overlapping contribution point set OC and the coverage contribution point set CC of the point are both regarded as visible points; then, the coordinate point set U with a value of 2 in the total field of view array corresponding to the visible point set is obtained, and the remaining viewpoints in the cluster are traversed; the intersection of viewpoint CC and U is deleted from CC, and then merged into the coverage contribution point set OC.