NDVI (normalized difference vegetation index) optimal threshold-based long-time-sequence green land data extraction method and device
By adaptively generating NDVI thresholds within the target area and selecting the optimal threshold to extract long-term green space data, the problem of insufficient accuracy of long-term green space data in existing technologies is solved, and an accurate assessment of the green space distribution range and quality is achieved.
Patent Information
- Application Number
- CN202510854294.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-10-17
AI Technical Summary
Existing technologies have the problem of insufficient accuracy in extracting long-term green space data, especially in cities or smaller-scale areas, it is difficult to accurately assess the distribution range and quality of green spaces in different periods.
By determining the boundary range of the target area, obtaining high-precision land cover data and NDVI data, adaptively generating multiple candidate NDVI thresholds, selecting the optimal NDVI threshold according to the green space division accuracy, and extracting long-term green space data.
It realizes the accurate assessment of the distribution range and quality of green space in a specific target area, is applicable to various target areas, and has good portability and high precision.
Smart Images

Figure CN120804389A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method and device for extracting long-term green space data based on an NDVI optimal threshold. Background Art
[0002] The Normalized Difference Vegetation Index (NDVI) is a vegetation monitoring metric based on remote sensing data. It quantifies vegetation cover by calculating the normalized difference between the reflectance of the near-infrared (NIR) and red (RED) bands. The formula is: NDVI = (NIR - RED) / (NIR + RED). NDVI values range from -1 to 1. Higher values indicate denser vegetation or higher chlorophyll content; values close to 0 indicate bare soil or rock; and negative values may correspond to water, clouds, or snow. NDVI is widely used in agricultural yield estimation, forest monitoring, drought assessment, and ecological and environmental research. Due to its simple calculation and sensitivity to vegetation changes, it has become one of the most commonly used vegetation indices. Many studies directly truncate NDVI data with values greater than 0 to characterize green space distribution and quality. This allows for rapid assessment of long-term green space data using remote sensing imagery. However, this approach ignores regional differences in climate and vegetation types, resulting in significant errors.
[0003] Furthermore, because current long-term land cover data products are mostly global or national scales, while they can meet large-scale research applications, they ignore regional heterogeneity and also contain errors at the scale of individual cities or smaller areas. Furthermore, widely used land cover data with high green space delineation accuracy at multiple scales only covers specific periods, making it difficult to quickly assess the distribution and quality of green spaces in other periods, thus failing to meet the needs of long-term applications. Summary of the Invention
[0004] The present invention provides a long-term green space data extraction method and device based on the NDVI optimal threshold, which solves the technical problem that the long-term land cover data is not accurate enough and the high-precision land cover data cannot meet the long-term application requirements.
[0005] The present invention provides a method for extracting long-term green space data based on an optimal NDVI threshold, which is characterized by comprising: Determine the boundary range of the target area, and obtain high-precision land cover data for a specific period within the boundary range and NDVI data consistent with the time range of the high-precision land cover data; Extracting base green space data representing green space in the target area from the high-precision land cover data; generating a plurality of candidate NDVI threshold values of the NDVI data in an adaptive manner; determining target green data of the target region under each of the candidate NDVI threshold values, and calculating green partition accuracy of green distribution in the target region according to the target green data and the base green data; selecting a candidate NDVI threshold value with the highest green partition accuracy as an optimal NDVI threshold value representing green distribution in the target region, and extracting long-time-series green data of the target region in other time periods except the specific time period according to the NDVI optimal threshold value.
[0006] In some embodiments, the generating a plurality of candidate NDVI threshold values of the NDVI data in an adaptive manner comprises: determining a plurality of step lengths for search updating of the NDVI data; sequentially performing search updating of the NDVI data in a descending order of the step lengths to obtain the plurality of candidate NDVI threshold values of the NDVI data.
[0007] In some embodiments, the obtaining the NDVI data consistent with the time range of the high-precision land cover data comprises: obtaining satellite remote sensing images of the target region in a specific time period within the time range of the high-precision land cover data of the specific time period; calculating NDVI data consistent with the time range of the high-precision land cover data according to red band reflectance data and near-infrared band reflectance data extracted from the satellite remote sensing images.
[0008] In some embodiments, the green partition accuracy comprises overall classification accuracy of green and Kappa coefficient, and the calculating the green partition accuracy in the target region according to the target green data and the base green data comprises: comparing target pixels in the target green data with base pixels in the base green data to obtain category values of a confusion matrix, wherein the target pixels and the base pixels compared are in the same pixel position in the target region; calculating the overall classification accuracy of green in the target region according to the category values, and calculating the Kappa coefficient according to the overall classification accuracy.
[0009] In some embodiments, the selecting a candidate NDVI threshold value with the highest green partition accuracy as an optimal NDVI threshold value representing green distribution in the target region comprises: Select the candidate NDVI threshold with the highest Kappa coefficient as the optimal NDVI threshold representing the green land distribution in the target region.
[0010] The application also provides a long-time-series green land data extraction device based on an optimal NDVI threshold, comprising: An acquisition module is configured to determine the boundary range of a target region, and acquire high-precision land cover data of a specific period within the boundary range and NDVI data consistent with the time range of the high-precision land cover data. An extraction module is configured to extract base green land data representing green land in the target region from the high-precision land cover data. A generation module is configured to generate multiple candidate NDVI thresholds of the NDVI data in an adaptive manner. A classification module is configured to determine target green land data of the target region under each candidate NDVI threshold, and calculate the green land division accuracy of the green land distribution in the target region according to the target green land data and the base green land data. An extraction module is configured to select the candidate NDVI threshold with the highest green land division accuracy as the optimal NDVI threshold representing the green land distribution in the target region, and extract long-time-series green land data of the target region in periods other than the specific period according to the optimal NDVI threshold.
[0011] In some embodiments, the generation module is further configured to determine multiple step lengths for searching and updating the NDVI data. The NDVI data is sequentially searched and updated in descending order of the step lengths, to obtain multiple candidate NDVI thresholds of the NDVI data.
[0012] The application also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the long-time-series green land data extraction method based on an optimal NDVI threshold according to any of the above embodiments when executing the computer program.
[0013] The application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program is executable on a processor to implement the long-time-series green land data extraction method based on an optimal NDVI threshold according to any of the above embodiments.
[0014] The application also provides a computer program product comprising a computer program, wherein the computer program is executable on a processor to implement the long-time-series green land data extraction method based on an optimal NDVI threshold according to any of the above embodiments.
[0015] The application provides a long-time-series green land data extraction method and device based on an NDVI optimal threshold value. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description one by one. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0017] Figure 1 is a flowchart of the long-time-series green land data extraction method based on the NDVI optimal threshold value provided by the application.
[0018] Figure 2 is an effect diagram of the overall classification accuracy and the Kappa coefficient calculated under the candidate NDVI threshold value.
[0019] Figure 3 is a structural diagram of the long-time-series green land data extraction device based on the NDVI optimal threshold value provided by the application.
[0020] Figure 4 is a structural diagram of the electronic device provided by the application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the application more clear, the technical solutions in the application will be described clearly and completely in combination with the drawings in the application. Obviously, the described embodiments are some of the embodiments of the application, not all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without any creative effort belong to the protection scope of the application.
[0022] The long-time-series green land data extraction method and device based on the NDVI optimal threshold value of the application will be described in combination with the drawings. Figure 1is a flowchart of a long-time-series green land data extraction method based on an NDVI optimal threshold provided by the present application, as shown in Figure 1 The method comprises the following steps 101 to 104.
[0023] Step 101, determine the boundary range of the target area, and obtain high-precision land cover data of the target area in a specific period and NDVI data consistent with the time range of the high-precision land cover data.
[0024] Embodiments of the present application are implemented in a specific target area, so the boundary range of the target area in a specific period needs to be determined first. The target area can be a region divided in a certain city, and the specific period is calculated in years, for example, 2020 or 2021.
[0025] Next, high-precision land cover data in the target area within the boundary range is obtained. For the target area, corresponding satellite remote sensing images can be collected to construct the corresponding high-precision land cover data through preprocessing, or corresponding gap-precision land cover data can be directly collected by a space agency in a certain region. Each pixel of the land cover data is labeled with a clear land cover type label (such as forest land, grassland, farmland, water body, etc.). The high-precision land cover data can be ESA (European Space Agency) land cover data, such as ESA_WorldCover_10m, which has been widely certified for its precision and covers the whole world.
[0026] In addition, NDVI data consistent with the time range of the land cover data also needs to be obtained within the boundary range of the target area. Here, time range consistency means the same period as the land cover data, i.e., the corresponding specific period. NDVI data can generally be determined by inversion in combination with corresponding satellite remote sensing images. It should be noted that the NDVI data threshold is generally a value range, i.e., the boundary region formed by two numerical ranges of NDVI data, referred to as a threshold, for example, 0.43-048. Within this threshold, the NDVI data can accurately represent the green land boundary and green land quality of the corresponding target area.
[0027] In some embodiments, the NDVI data consistent with the time range of the high-precision land cover data is obtained in the following manner: within the time range of the high-precision land cover data in the specific period, satellite remote sensing images of the target area in the specific period are obtained; according to the red band reflectance data and near-infrared band reflectance data extracted from the satellite remote sensing images, NDVI data consistent with the time range of the high-precision land cover data is calculated.
[0028] Specifically, the time range covered by the high-precision land cover data needs to be referred to here to determine the "particular period", for example, 2020 or 2021, and then the satellite remote sensing image of the target area in this particular period is obtained within the time range of the high-precision land cover data of the particular period, which is used to construct the NDVI data. Of course, the satellite remote sensing image needs to be preprocessed, such as performing radiation calibration and atmospheric correction, and then selecting the red light band and the near-infrared band to extract the corresponding reflectivity data. Further, according to the red light band reflectivity data and the near-infrared band reflectivity data extracted from the satellite remote sensing image, the initial data of the NDVI is calculated, and the minimum value i and the maximum value j of the initial data are used to determine an NDVI value range, denoted as (i, j). The initial data of the NDVI calculated here is the NDVI data consistent with the time range of the high-precision land cover data, which is used for subsequent searching of multiple candidate NDVI threshold values by an adaptive manner.
[0029] The normalized vegetation index based on the satellite remote sensing image in the target area calculated by the embodiment of the application is used as the initial threshold value of the NDVI data, which facilitates subsequent adaptive updating to search for the optimal NDVI threshold value.
[0030] The purpose of the embodiment of the application is to determine an NDVI optimal threshold value for extracting long-time-series green data of other periods (years) except the above-mentioned particular period to accurately represent the actual green distribution range. It should be noted that the NDVI optimal threshold value is also a value range, that is, the range formed by the two boundaries of the NDVI data.
[0031] Step 102, extracting the base green data representing the green in the target area from the high-precision land cover data.
[0032] Here, within the boundary range of the target area, the base green data representing the green in the target area can be extracted from the land cover data. That is, the pixels representing the green part are divided from the land cover data as the base green data, which is used as a reference.
[0033] Step 103, generating multiple candidate NDVI threshold values of the NDVI data by an adaptive manner.
[0034] Here, the NDVI data can be updated according to the adaptive manner on the basis of the NDVI data in step 101, and multiple new NDVI data are generated one by one as candidate NDVI threshold values, which facilitates the verification of the candidate NDVI threshold values on the representation ability of the green distribution in the target area, and the optimal NDVI threshold value is selected from them.
[0035] In some embodiments, the generation of multiple candidate NDVI threshold values of NDVI data in an adaptive manner can be implemented in the following specific description.
[0036] First, multiple steps for searching and updating NDVI data are determined, and the values of the multiple update steps decrease in turn. Here, the multiple steps with values decreasing in turn can be 0.1, 0.02, 0.005, 0.001, and of course can be flexibly set according to actual needs. Here, the number and values of the steps are not limited, as long as the values of the steps decrease in turn and do not exceed the maximum value range of NDVI (-1, 1).
[0037] Next, the NDVI data can be searched and updated in turn according to the order of the steps from large to small, and multiple candidate NDVI threshold values of the NDVI data are obtained. That is, the NDVI data is updated in turn by multiple steps decreasing, and multiple new NDVI data are searched to obtain candidate NDVI threshold values. Taking the number of steps as 4 and the values of the steps as 0.1, 0.02, 0.005, and 0.001 as an example, this searching and updating process can be divided into four stages, namely, coarse search, medium precision search, refinement search, and super-fine search, and the steps used in each stage are 0.1, 0.02, 0.005, and 0.001 in turn.
[0038] For example, the NDVI data (i, j) has a value of (0, 1), and different threshold combinations are generated through a step-by-step refinement search process to find the best NDVI threshold range to maximize the green land division accuracy (i.e., the overall classification accuracy and the Kappa coefficient). Specifically, the updating process is divided into four stages for searching.
[0039] First, the first stage is coarse search (Coarse Search), and the updating process of the threshold range is: i from 0 to 0.9, step 0.1; j from i+0.1 to 1.0, step 0.1. For example: Then, all threshold combinations of the above 0.1 order are traversed in turn, and the optimal NDVI threshold of the 0.1 order is determined based on the green land division accuracy.
[0040] The second stage is Medium Precision Search, whose threshold range is based on the optimal NDVI threshold determined in the first stage coarse search process, and then further refined. The threshold range is as follows: i of the optimal NDVI threshold is from i-0.1 to i+0.1, with a step of 0.02. And j of the optimal NDVI threshold is from j-0.1 to j+0.1, but must be greater than i+0.02, with a step of 0.02. Finally, multiple threshold combinations are obtained, and the corresponding optimal NDVI threshold is determined based on the green area division accuracy.
[0041] For example, if the optimal NDVI threshold (i, j) of the first stage coarse search is (0.3, 0.7), the threshold range of the medium precision search will be: i from 0.2 to 0.4, j from 0.5 to 0.8, with a step of 0.02.
[0042] The third stage is Fine Search, whose threshold range is based on the optimal NDVI threshold determined in the second stage medium precision search process, and then further refined. The threshold range is as follows: i of the optimal NDVI threshold is from i-0.02 to i+0.02, with a step of 0.005. And j of the optimal NDVI threshold is from j-0.02 to j+0.02, but must be greater than i+0.005, with a step of 0.005.
[0043] For example, if the optimal NDVI threshold (i, j) of the second stage medium precision search is (0.32, 0.68), the threshold range of the fine search will be: i from 0.3 to 0.34, j from 0.67 to 0.71, with a step of 0.005.
[0044] Finally, the fourth stage is Super Fine Search, whose threshold range is based on the optimal NDVI threshold determined in the third stage fine search process, and then further refined. The threshold range is as follows: i of the optimal NDVI threshold is from i-0.005 to i+0.005, with a step of 0.001. And j of the optimal NDVI threshold is from j-0.005 to j+0.005, but must be greater than i+0.001, with a step of 0.001.
[0045] For example, if the optimal NDVI threshold (i, j) of the third stage fine search is (0.325, 0.675), the threshold range of the super fine search will be: i from 0.32 to 0.35, j from 0.674 to 0.676, with a step of 0.001.
[0046] The whole search process narrows down the threshold range step by step through four different precision levels of search, and finally finds the optimal NDVI threshold range. Each stage generates a series of threshold combinations as candidate NDVI thresholds, and calculates the corresponding overall classification accuracy and Kappa coefficient, so as to select the optimal NDVI threshold.
[0047] In the embodiment of the application, an adaptive updating method of the initial threshold is realized by determining the updating step, so that the initial threshold can gradually approach the optimal threshold in the updating step which is sequentially reduced, the search time is reduced, and the priority threshold is more accurate.
[0048] Step 104, determining the target green data of the target area under each candidate NDVI threshold, and calculating the green division accuracy of the green distribution in the target area according to the target green data and the base green data.
[0049] After the plurality of candidate NDVI thresholds of the NDVI data are determined through the step 103, the candidate NDVI thresholds need to be verified one by one next, and the optimal NDVI threshold is selected from the candidate NDVI thresholds. The basis for judgment is to calculate the green division accuracy under the candidate NDVI threshold, which includes the overall classification accuracy of the green and the Kappa coefficient, and the candidate NDVI threshold with higher Kappa coefficient is preferentially considered as the optimal NDVI threshold.
[0050] Here, first, the target green data of the target area under each candidate NDVI threshold is determined. Each candidate NDVI threshold represents a range of NDVI values. According to these value ranges, the green boundary represented by the candidate NDVI threshold can be easily selected from the original NDVI data of the target area. The green boundary thus determined is the target green data.
[0051] Next, the green division accuracy of the green distribution in the target area is calculated according to the target green data and the base green data. That is, the green boundary selected by the candidate NDVI threshold (i.e. the target green data) is compared with the green data extracted by the actual high-precision land cover (i.e. the base green data) to determine the consistency of the spatial distribution. In the comparison, the base green data is taken as a reference, and then it is judged whether each target pixel in the target green data is correctly divided into a pixel representing green. This judgment result can be measured by the green division accuracy.
[0052] In some embodiments, the green division accuracy includes the overall classification accuracy of the green and the Kappa coefficient. The process of calculating the green division accuracy of the green distribution in the target area according to the target green data and the base green data is described in detail below.
[0053] Here, for each candidate NDVI threshold, the green field data of the target region is compared with the green field data of the base region to obtain the classification values of the confusion matrix.
[0054] In the calculation process, the pixels in the target green field data are compared with the pixels in the base green field data to obtain the classification values of the confusion matrix, wherein the target pixels and the base pixels are in the same pixel position in the target region. Since they are in the same target region, the number of pixels in the target green field data and the base green field data is consistent, and the position of each pixel is one-to-one corresponding. In the comparison, the two pixels corresponding to the pixel position are compared, and then it is judged whether the green field pixel is correctly classified to calculate the classification values of the confusion matrix.
[0055] Specifically, the base pixels of the base green field data are taken as the true values, including green field pixels and non-green field pixels, and the target pixels of the target green field data also include green field pixels and non-green field pixels, so the comparison process is to judge whether the corresponding target pixel is correctly divided into green field, that is, to determine whether each target pixel is correctly classified as a green field pixel or a non-green field pixel represented by the base pixel, and then to perform corresponding statistics.
[0056] The comparison result can be measured by the confusion matrix, and the classification values of the corresponding confusion matrix can be finally calculated. Determine whether each pixel is correctly classified as a green field pixel or a non-green field pixel, and then perform corresponding statistics.
[0057] The classification values of the confusion matrix are four, namely True Negative, False Positive, False Negative, and True Positive, abbreviated as TN, FP, FN, and TP. In the embodiment of the present application, TN represents the number of non-green field pixels in the target green field data that are correctly divided into non-green field, FP represents the number of green field pixels in the target green field data that are incorrectly divided into non-green field, FN represents the number of non-green field pixels in the target green field data that are incorrectly divided into green field, and TP represents the number of green field pixels in the land cover data that are correctly divided into green field. The sum of the four classification values of the confusion matrix is the element total, denoted as Total: (1) Next, the overall classification accuracy of the green field in the target region is calculated according to the classification values, and the overall classification accuracy is denoted as Accuracy, which is represented as follows: (2) Further, the Kappa coefficient is calculated according to the overall classification accuracy, and first an expected accuracy denoted as Excepted_accuracy is calculated, which is represented as follows: (3) Then, the Kappa coefficient is calculated according to the expected accuracy and the overall classification accuracy, denoted as Kappa, and is represented as follows: (4) In this way, for each candidate NDVI threshold, the overall classification accuracy and the Kappa coefficient can be calculated as the green land division accuracy according to the above-mentioned manner, which is used to represent the spatial consistency of the target green land data and the base green land data in the green land division.
[0058] As shown in FIG. 1 (a), Figure 2 As shown in FIG. 1 (a), Figure 2 The data points of the plurality of candidate NDVI thresholds determined from the initial threshold (i, j) in the land cover data of a certain region are listed in (a) of FIG. 1, and the initial threshold (i, j) is specifically taken as (0.30, 0.80), the horizontal coordinate is i, and the vertical coordinate is j. The overall classification accuracy "Accuracy" and the Kappa coefficient "Kappa" calculated by each candidate NDVI threshold are also shown. Further, the overall classification accuracy "Accuracy" distribution heat map calculated by the data points of each candidate NDVI threshold is shown. As shown in (b) of FIG. 1, Figure 2 As shown in (c) of FIG. 1, Figure 2 As shown in (c) of FIG. 1,
[0059] In the embodiment of the present application, for each candidate NDVI threshold, the overall classification accuracy and the Kappa coefficient are calculated as the green land division accuracy representing the green land division accuracy, which is used to measure the green land division accuracy of each candidate NDVI threshold. In this way, the NDVI optimal threshold can be selected from the candidate NDVI thresholds with the highest green land division accuracy, and the interpretability of the optimal threshold is ensured.
[0060] Step 105, selecting the candidate NDVI threshold with the highest green land division accuracy as the optimal NDVI threshold representing the green land distribution in the target region, and extracting the long-time green land data of the target region in other periods except for the specific period according to the NDVI optimal threshold.
[0061] Here, the candidate NDVI threshold with the highest green land division accuracy is selected as the NDVI optimal threshold representing the green land distribution in the target region. The green land division accuracy is the highest, which means that the division of the green land boundary in the land cover data is the most accurate, and this candidate NDVI threshold can be used as the optimal threshold of NDVI. Since the green land division accuracy includes the overall classification accuracy and the Kappa coefficient, when selecting, the candidate NDVI threshold with the highest Kappa coefficient is preferred, and then the candidate NDVI threshold with the highest overall classification accuracy is compared and selected as the NDVI optimal threshold.
[0062] In some embodiments, the candidate NDVI threshold with the highest green land division accuracy is selected as the optimal NDVI threshold representing the green land distribution in the target region, which can be achieved in the following way.
[0063] Specifically, the candidate NDVI threshold with the highest Kappa coefficient is selected as the optimal NDVI threshold representing the green land distribution in the target region.
[0064] Of course, in other embodiments, the candidate NDVI thresholds can also be arranged in descending order of Kappa coefficients, and multiple candidate NDVI thresholds are selected from the head of the obtained threshold sequence. That is, multiple candidate NDVI thresholds with larger Kappa coefficient values are selected as the target NDVI thresholds, and then the target NDVI threshold with the highest overall classification accuracy is selected as the optimal NDVI threshold representing the green land distribution in the target region. In this way, it can be ensured that both indicators of green land division accuracy are optimized.
[0065] In the embodiments of the present application, the NDVI optimal threshold is accurately selected from the candidate NDVI thresholds according to the green land division accuracy, which realizes more accurate evaluation of the green land distribution range and the green land quality in the target region at a specific time period.
[0066] Further, the NDVI optimal threshold can accurately divide the green land in the target region at a specific time period, and the long-time green land data can be extracted from the NDVI data of other time periods than the specific time period by using the NDVI optimal threshold. That is, the corresponding green land data is extracted from the NDVI data of other time periods by using the NDVI optimal threshold, so as to accurately represent the long-time green land distribution of the target region, and thus obtain the long-time green land distribution and vegetation quality data adapted to the target region.
[0067] Here, the other time period is also calculated in years and is different from the specific time period, which can be a time period before the specific time period, so as to extract the historical long-time green land data, or a time period after the specific time period, so as to extract the future long-time green land data. The specific time period is 2020 or 2021, and the other time period can be any year in which effective NDVI data can be obtained.
[0068] In this embodiment of the present invention, multiple candidate NDVI thresholds are adaptively determined, and the green space demarcation accuracy of each candidate NDVI threshold is evaluated one by one based on the green space demarcation accuracy. Finally, the optimal NDVI threshold is selected to extract long-term green space data from other different time periods, meeting the application requirements of long-term green space data. Furthermore, the long-term green space data filtered by the optimal NDVI threshold can more accurately assess the distribution range and green space quality in a specific target area. Furthermore, this method is not restricted by region and can be applied to land cover data from various target areas, with good portability.
[0069] The following describes the long-term green space data extraction device based on the NDVI optimal threshold provided by the present invention. The long-term green space data extraction device based on the NDVI optimal threshold described below and the long-term green space data extraction method based on the NDVI optimal threshold described above can be referenced to each other.
[0070] like Figure 3 As shown, the long-term green space data extraction device based on the NDVI optimal threshold includes: an acquisition module 301, an extraction module 302, a generation module 303, a classification module 304, and an extraction module 305.
[0071] Specifically, the acquisition module 301 is used to determine the boundary range of the target area and obtain high-precision land cover data of a specific period within the boundary range and NDVI data consistent with the time range of the high-precision land cover data; the extraction module 302 is used to extract the base green space data representing the green space in the target area from the high-precision land cover data; the generation module 303 generates multiple candidate NDVI thresholds for the NDVI data in an adaptive manner; the classification module 304 is used to determine the target green space data of the target area under each of the candidate NDVI thresholds, and calculate the green space division accuracy of the green space distribution in the target area based on the target green space data and the base green space data; the extraction module 305 is used to select the candidate NDVI threshold with the highest green space division accuracy as the optimal NDVI threshold for representing the green space distribution in the target area, and extract the long-term green space data of the target area in other periods other than the specific period based on the NDVI optimal threshold.
[0072] In some embodiments, the generation module 303 is further used to determine multiple step sizes for searching and updating the NDVI data; and the NDVI data is searched and updated in descending order of the step sizes to obtain multiple candidate NDVI thresholds for the NDVI data.
[0073] It should be noted that the beneficial effects of the long-term green space data extraction device based on the NDVI optimal threshold here and the long-term green space data extraction method based on the NDVI optimal threshold mentioned above can correspond to each other, so the beneficial effects of the long-term green space data extraction device based on the NDVI optimal threshold will not be repeated here.
[0074] Figure 4 An example of a physical structure diagram of an electronic device is shown below. Figure 4 As shown, the electronic device may include: a processor (processor) 410 , a communication interface (Communications Interface) 420 , a memory (memory) 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other via the communication bus 440 . The processor 410 can call the logic instructions in the memory 430 to execute a long-term green space data extraction method based on the NDVI optimal threshold, which includes: determining the boundary range of the target area, and obtaining high-precision land cover data of a specific period within the boundary range and NDVI data consistent with the time range of the high-precision land cover data; extracting base green space data representing the green space in the target area from the high-precision land cover data; generating multiple candidate NDVI thresholds for the NDVI data in an adaptive manner; determining the target green space data of the target area under each of the candidate NDVI thresholds, and calculating the green space division accuracy of the green space distribution in the target area based on the target green space data and the base green space data; selecting the candidate NDVI threshold with the highest green space division accuracy as the optimal NDVI threshold representing the green space distribution in the target area, and extracting the long-term green space data of the target area in other periods except the specific period based on the NDVI optimal threshold.
[0075] Furthermore, the logic instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0076] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the long-term green space data extraction method based on the NDVI optimal threshold provided by the above methods, the method including: determining the boundary range of the target area, and obtaining high-precision land cover data of a specific period within the boundary range and NDVI data consistent with the time range of the high-precision land cover data; extracting base green space data representing the green space in the target area from the high-precision land cover data; generating multiple candidate NDVI thresholds for the NDVI data in an adaptive manner; determining the target green space data of the target area under each of the candidate NDVI thresholds, and calculating the green space division accuracy of the green space distribution in the target area based on the target green space data and the base green space data; selecting the candidate NDVI threshold with the highest green space division accuracy as the optimal NDVI threshold representing the green space distribution in the target area, and extracting the long-term green space data of the target area in other periods other than the specific period based on the NDVI optimal threshold.
[0077] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the long-term green space data extraction method based on the NDVI optimal threshold provided by the above-mentioned methods, the method comprising: determining the boundary range of the target area, and obtaining high-precision land cover data of a specific period within the boundary range and NDVI data consistent with the time range of the high-precision land cover data; extracting base green space data representing the green space in the target area from the high-precision land cover data; generating multiple candidate NDVI thresholds for the NDVI data in an adaptive manner; determining the target green space data of the target area under each of the candidate NDVI thresholds, and calculating the green space division accuracy of the green space distribution in the target area based on the target green space data and the base green space data; selecting the candidate NDVI threshold with the highest green space division accuracy as the optimal NDVI threshold representing the green space distribution in the target area, and extracting the long-term green space data of the target area in other periods except the specific period based on the NDVI optimal threshold.
[0078] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0079] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0080] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A long-term green space data extraction method based on NDVI optimal threshold, characterized by: include: Determine the boundary range of the target area, and obtain high-precision land cover data for a specific period within the boundary range and NDVI data consistent with the time range of the high-precision land cover data; Extracting base green space data representing green space in the target area from the high-precision land cover data; generating a plurality of candidate NDVI thresholds of the NDVI data in an adaptive manner; Determining target green space data of the target area under each candidate NDVI threshold, and calculating the green space division accuracy of the green space distribution within the target area based on the target green space data and the base green space data; The candidate NDVI threshold with the highest green space division accuracy is selected as the optimal NDVI threshold for characterizing the green space distribution in the target area, and the long-term green space data of the target area in other periods except the specific period are extracted based on the optimal NDVI threshold.
2. The long-term green space data extraction method based on the NDVI optimal threshold according to claim 1 is characterized in that: The method of generating a plurality of candidate NDVI thresholds of the NDVI data in an adaptive manner includes: determining a plurality of step sizes for searching and updating the NDVI data; The NDVI data are searched and updated in sequence according to the step size from large to small to obtain a plurality of candidate NDVI thresholds of the NDVI data.
3. The long-term green space data extraction method based on NDVI optimal threshold according to claim 1 is characterized in that: The method for obtaining the NDVI data consistent with the time range of the high-precision land cover data includes: Acquiring satellite remote sensing images of the target area during the specific period within the time range of high-precision land cover data during the specific period; NDVI data consistent with the time range of the high-precision land cover data is calculated based on the red light band reflectance data and the near-infrared band reflectance data extracted from the satellite remote sensing image.
4. The long-term green space data extraction method based on NDVI optimal threshold according to claim 1 is characterized in that: The green space division accuracy includes the overall classification accuracy of the green space and the Kappa coefficient. The green space division accuracy within the target area is calculated based on the target green space data and the base green space data, including: Comparing the target pixel in the target green space data with the base pixel in the base green space data to obtain a category value of a corresponding confusion matrix, wherein the compared target pixel and the base pixel are in the same pixel position within the target area; The overall classification accuracy of the green space in the target area is calculated based on the category value, and the Kappa coefficient is calculated based on the overall classification accuracy.
5. The long-term green space data extraction method based on NDVI optimal threshold according to claim 1 is characterized in that: The step of selecting the candidate NDVI threshold with the highest green space division accuracy as the optimal NDVI threshold for characterizing green space distribution in the target area includes: The candidate NDVI threshold with the highest Kappa coefficient is selected as the optimal NDVI threshold for characterizing the distribution of green space in the target area.
6. A long-term green space data extraction device based on NDVI optimal threshold, characterized by: include: An acquisition module is used to determine the boundary range of the target area and obtain high-precision land cover data for a specific period within the boundary range and NDVI data consistent with the time range of the high-precision land cover data; an extraction module, configured to extract base green space data representing green space in the target area from the high-precision land cover data; A generating module, configured to generate a plurality of candidate NDVI thresholds of the NDVI data in an adaptive manner; a classification module, configured to determine target green space data of the target area under each candidate NDVI threshold, and calculate the green space division accuracy of the green space distribution within the target area based on the target green space data and the base green space data; An extraction module is used to select the candidate NDVI threshold with the highest green space division accuracy as the optimal NDVI threshold for characterizing the green space distribution in the target area, and extract the long-term green space data of the target area in other periods other than the specific period based on the optimal NDVI threshold.
7. The long-term green space data extraction device based on the NDVI optimal threshold according to claim 6 is characterized in that: The generating module is further configured to determine a plurality of step sizes for searching and updating the NDVI data; The NDVI data are searched and updated in sequence according to the step size from large to small to obtain a plurality of candidate NDVI thresholds of the NDVI data.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the long-term green space data extraction method based on the NDVI optimal threshold is implemented as described in any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the long-term green space data extraction method based on the NDVI optimal threshold is implemented as described in 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 long-term green space data extraction method based on the NDVI optimal threshold is implemented as described in any one of claims 1 to 5.