Crop classification feature optimization method and system for heterogeneous farmland landscape areas

By using the random forest algorithm to screen the best features and add vegetation index and texture features in heterogeneous farmland landscape areas, the problem of low crop classification accuracy in the existing technology is solved, and efficient and accurate crop classification in complex agricultural landscapes is achieved. Classification.

CN114550008BActive Publication Date: 2024-09-13SHANDONG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210191597.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2024-09-13
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

When existing technologies use remote sensing images to classify crops in complex and diverse agricultural landscapes, it is difficult to accurately identify different crop types and their spatial distribution characteristics, especially in heterogeneous farmland landscape areas, resulting in low classification accuracy.

Method used

A random forest algorithm is used to screen the best feature subset, a lookup table is constructed to search for the best classification features and classifiers in each landscape group, and vegetation index and texture features are added to compensate for the accuracy loss caused by configuration heterogeneity, Ensuring feasibility, robustness, and accuracy of crop classification in heterogeneous farmland landscapes.

Benefits of technology

Improved crop classification accuracy in complex agricultural landscapes, ensuring the highest classification accuracy in the shortest time and applicable to heterogeneous farmland landscape areas, providing a systematic and comprehensive testing method to determine the best classification for a specific crop landscape device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114550008B
    Figure CN114550008B
Patent Text Reader

Abstract

The present invention discloses a method and system for optimizing crop classification features for heterogeneous farmland landscape areas, including: formulating a lookup table, storing the best feature set, the best classifier and the corresponding landscape pattern label in the lookup table; obtaining the landscape pattern of the farmland landscape area to be queried, and outputting the best feature set and the best classifier corresponding to the current landscape pattern according to the records in the lookup table; using the best feature set and the best classifier to complete the crop classification task of the landscape pattern of the farmland landscape area to be queried. The method of the present invention is suitable for crop classification in heterogeneous farmland landscape areas, and the method has high feasibility, robustness and classification result accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of farmland landscape image processing, and in particular to a method and system for optimizing crop classification features in heterogeneous farmland landscape areas. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] Accurate information on crop types and their spatial distribution characteristics is essential for agricultural management. Different crops may have similar spectral characteristics due to similar development cycles and crop phenology. All of this makes crop mapping through remote sensing images more challenging, especially in complex and diverse agricultural landscapes.

[0004] The optimal characteristics vary when the crop types in the study area are different, and even for the same crop type, the optimal characteristics vary when the crop spatial distribution in the study area is different. Therefore, it is necessary to conduct systematic experiments to determine the optimal characteristics for specific crop planting structures and spatial distributions.

[0005] The existing crop classification and recognition technologies use a variety of feature selection methods, and the contributions of different features are discussed. They are mainly divided into two categories: the performance of different classifiers in automatic crop classification and mapping is explored from the perspective of crop type; considering the huge impact of spatial heterogeneity on crop mapping, ecological landscape heterogeneity is selected as a descriptor of crop planting pattern.

[0006] However, both of the above solutions have disadvantages:

[0007] On the one hand, most current studies explore the performance of classifiers from the perspective of crop type without considering the spatial distribution of crops. Therefore, it is also necessary to conduct systematic experiments to determine the best classifier for a specific crop landscape;

[0008] On the other hand, although the impact of landscape heterogeneity on crop mapping has been noted in some studies, a set of systematic and comprehensive tests is considered necessary to determine the optimal requirements of features and classifiers for crop classification performance in heterogeneous landscapes. Summary of the invention

[0009] In order to solve the deficiencies of the prior art, the present invention provides a method and system for optimizing crop classification features in heterogeneous farmland landscape areas. The present invention quantitatively explores and systematically analyzes the impact of heterogeneous agricultural landscapes on crop mapping optimal features and classifier requirements.

[0010] In a first aspect, the present invention provides a method for optimizing crop classification features in heterogeneous farmland landscape areas;

[0011] The crop classification feature optimization method for heterogeneous farmland landscape areas includes:

[0012] Formulate a lookup table, and store the best feature set, the best classifier, and the corresponding landscape pattern label in the lookup table;

[0013] Obtain the landscape mode of the farmland landscape area to be queried, and output the best feature set and the best classifier corresponding to the current landscape mode according to the records in the lookup table;

[0014] The best feature set and the best classifier are used to complete the crop classification task of the landscape pattern of the farmland landscape area to be queried.

[0015] In a second aspect, the present invention provides a crop classification feature optimization system for heterogeneous farmland landscape areas;

[0016] The crop classification feature optimization system for heterogeneous farmland landscape areas includes:

[0017] A lookup table formulation module is configured to: formulate a lookup table, and store the best feature set, the best classifier and the corresponding landscape pattern label in the lookup table;

[0018] A search module is configured to: obtain a landscape mode of a farmland landscape area to be queried, and output an optimal feature set and an optimal classifier corresponding to the current landscape mode according to the records in the search table;

[0019] The classification module is configured to use the best feature set and the best classifier to complete the crop classification task of the landscape pattern of the farmland landscape area to be queried.

[0020] In a third aspect, the present invention further provides an electronic device, comprising:

[0021] a memory for non-transitory storage of computer-readable instructions; and

[0022] a processor for executing the computer readable instructions,

[0023] When the computer-readable instructions are executed by the processor, the method described in the first aspect is executed.

[0024] In a fourth aspect, the present invention further provides a storage medium that non-temporarily stores computer-readable instructions, wherein when the non-temporary computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.

[0025] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein the computer program is used to implement the method described in the first aspect when running on one or more processors.

[0026] Compared with the prior art, the present invention has the following beneficial effects:

[0027] The present invention quantitatively explores and systematically analyzes the impact of heterogeneous agricultural landscapes on the requirements for optimal features and classifiers for crop mapping. With the increasing complexity of agricultural heterogeneity and crop identification, as well as similar developmental cycles and crop phenology, different crops may have similar spectral features. The feature optimization method of the present invention includes: screening and determining the best feature subset based on a random forest algorithm; constructing a lookup table to search for the best classification features and classifiers in each landscape group; adding vegetation index and texture features to appropriately compensate for the loss of accuracy caused by configuration heterogeneity. The above method is suitable for crop classification in heterogeneous farmland landscape areas, and the method has high feasibility, robustness and accuracy of classification results, and can better perform crop mapping through remote sensing images in complex and diverse agricultural landscapes.

[0028] Considering the spatial distribution of crops, systematic experiments were conducted to determine the best classifier for a specific crop landscape; in order to evaluate the importance of classification features and the impact of classifiers on classification accuracy, a lookup table was constructed to search for the best classification features and classifiers in each landscape group. If the landscape pattern is known, the best features and the best classifier can be selected through the lookup table to ensure the highest classification accuracy in the shortest time; adding vegetation index and texture features can appropriately compensate for the accuracy loss caused by configuration heterogeneity; using random forest algorithm to screen feature subsets can improve performance in high landscape heterogeneity; when determining the optimal requirements of features and classifiers for crop classification performance in heterogeneous landscapes, a set of systematic and comprehensive tests was established. The method described in the present invention is suitable for crop classification in heterogeneous farmland landscape areas, and the method feasibility, robustness and classification result accuracy are high. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0030] Figure 1 A schematic diagram of a process flow of a crop classification feature optimization method provided in an embodiment of the present invention;

[0031] Figure 2(a), Figure 2(b1), Figure 2(b2), Figure 2(c1), Figure 2(c2), and Figure 2(c3) are data of observation locations used in the embodiment of the present invention;

[0032] Figure 3(a) and Figure 3(b) show the comparison of classification accuracy based on different landscape groups and classification schemes;

[0033] Figure 4(a) to Figure 4(f)Comparison of OA and Kappa coefficients corresponding to the four classifiers in different landscape groups;

[0034] Figure 5(a) to Figure 5(d) is the correlation coefficient between the difference in crop classification accuracy and HOI or SPLIT;

[0035] Figure 6(a) to Figure 6(d) The difference is configurational heterogeneity and compositional inhomogeneity. DETAILED DESCRIPTION

[0036] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0037] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0039] In this embodiment, all data is obtained in compliance with laws and regulations and based on the user's consent, and is used legally.

[0040] Embodiment 1

[0041] This embodiment provides a method for optimizing crop classification features in heterogeneous farmland landscape areas;

[0042] like Figure 1 As shown in the figure, the crop classification feature optimization method for heterogeneous farmland landscape areas includes:

[0043] S101: Formulate a lookup table, and store the best feature set, the best classifier, and the corresponding landscape pattern label in the lookup table;

[0044] S102: Obtain the landscape mode of the farmland landscape area to be queried, and output the best feature set and the best classifier corresponding to the current landscape mode according to the records in the lookup table;

[0045] S103: Using the best feature set and the best classifier to complete the crop classification task of the landscape pattern of the farmland landscape area to be queried.

[0046] Furthermore, the optimal feature set and the optimal classifier; the acquisition process includes:

[0047] S101-1: Acquire remote sensing images of P different landscape pattern labels of a known farmland landscape area; the value of P is 6;

[0048] S101-2: pre-processing the remote sensing image to generate a sample set; extracting L types of image features from the remote sensing image of each landscape mode in the sample set; the value of L is 40;

[0049] S101-3: Based on L types of image features, formulate M types of feature classification schemes with known landscape pattern labels; the value of M is 5;

[0050] S101-4: Based on the best feature subset under each landscape mode label, classify N classification algorithms respectively to obtain the best classifier under each landscape mode label; the value of N is 5;

[0051] Based on the optimal classifier under each landscape pattern label, the M feature classification schemes of known landscape pattern labels are classified respectively to obtain the optimal feature classification scheme; the features corresponding to the optimal feature classification scheme are taken as the best feature set.

[0052] Furthermore, the S101-1: obtaining remote sensing images of P different landscape mode labels of a known farmland landscape area; wherein the different landscape mode labels include:

[0053] Individual crops with a landscape area configuration heterogeneity level SPLIT less than 436;

[0054] Individual crops with a landscape area configuration heterogeneity level SPLIT greater than 436;

[0055] The degree of landscape area configuration heterogeneity SPLIT is less than 496 for the two crop types;

[0056] The degree of landscape area configuration heterogeneity SPLIT was greater than 496 for the two crop types;

[0057] The degree of landscape area configuration heterogeneity SPLIT is less than 623 for three crop types;

[0058] There are three crop types with a landscape area configuration heterogeneity degree SPLIT greater than 623.

[0059] Exemplarily, in order to more comprehensively reflect the landscape heterogeneity, 60 areas with an area of ​​10 km × 10 km were selected as test points within a certain range (distributed in plains and mountainous areas).

[0060] The cultivated land map generated from the Global Land Cover Fine Resolution Observation and Monitoring (FROM-GLC10) was used to remove non-crop areas, which includes a 10-meter resolution global land cover map with 10 levels from Sentinel-2 2017 data. Figure 2(a), Figure 2(b1), Figure 2(b2), Figure 2(c1), Figure 2(c2), and Figure 2(c3) are data of observation sites used in the embodiments of the present invention.

[0061] The ground truth data used in this invention were collected from 60 districts from July to September 2019. During the survey, details of representative crop types, including rice, corn, soybeans, and other minor crops, were recorded. The location of each sample location was also recorded using a handheld GPS with a positioning accuracy of 5m. The number of field survey samples in each district is listed, including single crops (15 districts), two types of crops (26 districts, 11 of which planted corn and soybeans, and 15 planted corn and rice), and three types of crops (19 districts). The total number of corn, rice, and soybeans was 2088, 1818, and 1223, respectively.

[0062] Furthermore, the S101-2: preprocessing the remote sensing image to generate a sample set specifically includes:

[0063] Convert the reflectivity of remote sensing images from the top of the atmosphere to the bottom of the atmosphere;

[0064] The converted image is sampled using bilinear interpolation;

[0065] The sampled data is cropped to obtain an image of the study area.

[0066] For example, Sentinel-2 remote sensing image data covering the area is obtained, and the image data is preprocessed, including: atmospheric correction, format conversion, and image cropping according to farmland maps. Based on the field survey data, a sample set is generated in combination with Google Earth images.

[0067] Acquire Sentinel-2 remote sensing image data covering the area and pre-process the image data, including:

[0068] The top of atmosphere (TOC) (level 1C) data were converted to bottom of atmosphere (BOC) reflectance using the Sen2Cor processor. The output was then resampled to 10m spatial resolution using a bilinear interpolation method on the Sentinel Application Platform (SNAP). Finally, the data and boundaries of the study sites were subsetted to obtain an image of the study area.

[0069] The sample set was generated by combining Google Earth images, including: using the Google Earth map download tool to download the map of the corresponding level, and using ENVI 5.3 image processing software to select ROI on the Google Earth image in .tif format and save it to a shape file for subsequent use.

[0070] Furthermore, the S101-2 extracts L types of image features from the remote sensing images of each landscape mode in the sample set; specifically, it includes:

[0071] Spectral features and texture features are extracted from the remote sensing images of each landscape pattern in the sample set;

[0072] The spectral features and texture features include: 40 features;

[0073] The 40 features refer to: reflectance of 10 spectral bands of Sentinel-2, 14 additional vegetation indices and 16 texture features.

[0074] Among them, the reflectances of the 10 spectral bands of Sentinel-2 are all the bands of Sentinel-2, namely Band 2, Band 3, Band 4, Band 5, Band 6, Band 7, Band 8, Band 8A, Band 11 and Band 12, which are correspondingly represented as B2, B3, B4, B5, B6, B7, B8, B8A, B11 and B12, where B refers to Band.

[0075] The 14 additional vegetation indices include: a vegetation index without the red edge band and a vegetation index with the red edge band;

[0076] Vegetation indices without red edge band include: greenness index (GI), normalized difference vegetation index (NDVI), greenness vegetation index (VIgreen), renormalized difference vegetation index (RDVI), soil adjustment vegetation index (SAVI), and modified ratio vegetation index (MSR);

[0077] The vegetation indices containing red edge bands include: Band 5 Red Edge Normalized Vegetation Index (B5RedNDVI), Band 6 Red Edge Normalized Vegetation Index (B6RedNDVI), Band 5 Converted Chlorophyll Absorption Reflectance Index (B5TCARI), Band 6 Converted Chlorophyll Absorption Reflectance Index (B6TCARI), Band 5 Triangular Vegetation Index (B5TVI), and Band 6 Triangular Vegetation Index (B6TVI).

[0078] Among them, the texture features include: the mean of the near-infrared band, the variance (Var) of the near-infrared band, the homogeneity (H) of the near-infrared band, the contrast (Con) of the near-infrared band, the dissimilarity (Dis) of the near-infrared band, the entropy (Ent) of the near-infrared band, the second-order moment (SM) of the near-infrared band and the correlation (Cor) of the near-infrared band; and the mean of the red edge band, the variance (Var) of the red edge band, the homogeneity (H) of the red edge band, the contrast (Con) of the red edge band, the dissimilarity (Dis) of the red edge band, the entropy (Ent) of the red edge band, the second-order moment (SM) of the red edge band and the correlation (Cor) of the red edge band.

[0079] Spectral and textural features are two basic feature types commonly used in image interpretation and classification, and are used to screen the best feature combination. Candidate features are divided into four groups, including reflectance in 10 spectral bands (FT1), 14 additional vegetation indices (divided into two groups FT2 and FT3 according to the presence of the red edge band) and texture features (FT4). Candidate texture features are derived from the gray-level co-occurrence matrix of the near-infrared and red-edge bands.

[0080] Previous studies have shown that the red edge band is beneficial for crop extraction. For features related to the red edge band, only two types calculated from bands 5 and 6 (B5 and B6) of Sentinel-2 were used, because the ND vegetation index generated based on band 7 (B7) was found to be of poor quality.

[0081] Candidate texture features are derived from the gray-level co-occurrence matrix of the near-infrared and red-edge bands. The present invention considers eight texture features, namely, mean, variance (Var), homogeneity (H), contrast (Con), dissimilarity (Dis), entropy (Ent), second-order moment (SM) and correlation (Cor), and sets a window size of 9×9 pixels. For the red-edge band used in GLCM, only band 6 (B6) of Sentinel-2 was selected because it performs better than band 5 (B5) of Sentinel-2 in corn and soybean identification.

[0082] Select the statistics based on the gray-level co-occurrence matrix as the texture classification feature:

[0083] ① Contrast: measures the local changes in an image. Contrast reflects the clarity of an image and the depth of the texture. The clearer the texture, the greater the contrast.

[0084]

[0085] ② Entropy: When all values ​​in the co-occurrence matrix are equal or the pixel values ​​show the greatest randomness, the entropy is the largest; therefore, the entropy value indicates the complexity of the grayscale distribution of the image. The larger the entropy value, the more complex the image.

[0086]

[0087] ③ Second-order moment: If the element values ​​of the gray-level co-occurrence matrix are similar, the energy is small, indicating a fine texture; if some of the values ​​are large and others are small, the energy value is large. A large energy value indicates a more uniform and regularly changing texture pattern.

[0088]

[0089] ④Correlation: It is used to measure the similarity of the grayscale of the image in the row or column direction. Therefore, the size of the value reflects the local grayscale correlation. The larger the value, the greater the correlation.

[0090]

[0091] Furthermore, the S101-3: formulating M feature classification schemes for known landscape mode labels based on L image features; includes:

[0092] Plan A, all 40 features;

[0093] Solution B, the best feature subset corresponding to the current landscape mode label;

[0094] Scheme C, the reflectance of 10 spectral bands of Sentinel-2;

[0095] Scheme D is a combination of the reflectance of 10 spectral bands of Sentinel-2 and 14 additional vegetation indices;

[0096] Scheme E is a combination of the reflectance of 10 spectral bands and 16 texture features of Sentinel-2.

[0097] Five classification schemes are designed for crop extraction and the performance of different feature combinations is further evaluated.

[0098] Specifically, Scheme A uses all 40 features, Scheme B is based on the results of feature selection, Scheme C maps crop planting areas based on the reflectance of 10 spectral bands of Sentinel-2, Scheme D uses only 24 spectral features, and Scheme E uses 10 spectral bands combined with 16 texture features.

[0099] Furthermore, in scheme B, the process of determining the best feature subset corresponding to the current landscape mode label specifically includes:

[0100] All 40 image features are input into the random forest algorithm at the same time, and the weights of different features are output;

[0101] Sort the features in descending order of weight;

[0102] Select several features with the highest ranking, and the combination is called the best feature subset.

[0103] The random forest package in Matlab2018 was used to evaluate the weights and rankings of different feature variables to select the best feature subset.

[0104] G=Uniform({g t})

[0105] The optimal dimension of candidate features ranked by importance is investigated via sequential forward selection (SFS).

[0106] Due to different sensitivities to specific features, not all features are equally effective in identifying crops. Numerous studies have shown that the random forest algorithm is attractive not only in classification but also in feature selection. The present invention uses the random forest package in Matlab2018 to evaluate the weights and rankings of different feature variables to select the best feature subset. Considering the inherent randomness of the random forest method leads to uncertainty in the results of each feature.

[0107] The optimal dimensionality of candidate features ranked by importance was investigated by sequential forward selection (SFS). This process operates by adding features one by one until the accuracy seed increases significantly with the addition of new features, indicating that relatively high accuracy and low computational cost can be achieved with reduced data size.

[0108] Random forest is used for feature selection by using the method of measuring the importance of feature vectors and selecting features based on the ranking results of the feature set. The specific construction steps are as follows:

[0109] The number of original samples is N and the feature dimension is m.

[0110] Input: a set of training samples {(x1,y1),...,(x N ,y N )}.

[0111] Step 1: Generate a bootstrapped sample set D of size N t .

[0112] Step 2: In the self-service sample set D t The classification and regression tree algorithm is used to obtain g t .

[0113] Step 3: Sample the columns (features) of each tree and randomly select Features, in m try Select a feature with the highest variable importance for node SPLIT.

[0114] Step 4: Determine whether the number of current trees t satisfies t≤ntree. If so, repeat steps 1 to 3; if not, stop the loop.

[0115] Output: G = Uniform ({g t}).

[0116] The feature subsets are sequentially added from the empty set, and one feature is selected each time to be added to the feature subset to make the feature function optimal. In essence, a feature that makes the value of the evaluation function optimal is selected each time. The iterative feature evaluation results are obtained to solve the arbitrariness of the existing algorithm in determining the size of the feature subset and the instability of the results. That is, according to the results of the descending order of feature importance, the next feature is added starting from the feature at the first position, and then each feature vector combination is input into the classifier to calculate the classification error probability until all features are used to obtain the classification error probability of the classification model, and the combination with the minimum error probability is selected as the final feature selection result.

[0117] Furthermore, the S101-4: classifying N classification algorithms based on the best feature subset under each landscape mode label to obtain the best classifier under each landscape mode label specifically includes:

[0118] The best feature subsets under the current landscape mode label are input into N classification algorithms respectively to obtain N classification accuracies, and the algorithm with the highest classification accuracy is selected as the optimal classifier under the current landscape mode label.

[0119] Furthermore, the S101-4: based on the optimal classifier under each landscape mode label, classify the M feature classification schemes of the known landscape mode labels respectively to obtain the optimal feature classification scheme; specifically includes:

[0120] The M feature classification schemes are respectively input into the optimal classifier under the current landscape mode label to obtain M classification accuracies, and the feature classification scheme with the highest classification accuracy is selected as the optimal feature classification scheme.

[0121] Among them, the classification accuracy is measured by the OA index and the Kappa index.

[0122] Further, the S101-4: based on the best feature subset under each landscape mode label, classify N classification algorithms respectively to obtain the best classifier under each landscape mode label; wherein the N classification algorithms include:

[0123] Random forest models, support vector machines, artificial neural networks, and maximum likelihood classifiers.

[0124] Four machine learning algorithms (MLC, ANN, SVM, and RF) were selected to evaluate the algorithm's dependence on landscape heterogeneity. The MLC and ANN algorithms were calculated based on parameters set to default values. For SVM, the classification probability threshold was set to zero to ensure that all pixels participated in the classification and each pixel was defined as the specified cover type. The kernel width (gamma) was set to 0.1 and the penalty parameters were taken by default. For random forest, the required number of classification trees (n tree ) and the number of predictor variables (m try ) to generate the prediction model. In this study, m try is set to the default value, which is the square root of the number of features, n tree is set to a relatively high value of 1000 to allow convergence of the out-of-bag (OOB) error statistics. The four classification algorithms are applied to the five feature classification schemes to compare their performance in crop recognition.

[0125] Four machine learning algorithms (MLC, ANN, SVM and RF) were selected to evaluate the algorithm's dependence on landscape heterogeneity. try is set to the default value, which is the square root of the number of features, n tree is set to a relatively high value of 1000 to allow convergence of the out-of-bag (OOB) error statistics. The four machine learning algorithms are applied to five classification schemes to compare their performance in crop recognition.

[0126] The importance of feature vectors is measured using out-of-bag observations. Samples that are not selected after self-service sample aggregation are called "out-of-bag data (OOB)". OOB has the characteristics of a validation set, so the OOB error is used to verify the generalization error of the random forest G. As shown in the following formula:

[0127]

[0128] Where: To include only x n It is an OOB decision tree. The method of using out-of-bag data to measure the importance of feature vectors is to reorder the features on the OOB samples and achieve feature sorting by calculating the "PermutationImportance" of the features.

[0129] The accuracy of general crop classification can be evaluated using confusion matrix. Overall accuracy (OA) and Kappa coefficient, two key indicators to measure whether the classification results can meet user requirements, were selected for study.

[0130] The classification accuracy is calculated using the overall accuracy OA and Kappa coefficient, the former being the ratio of the number of correctly classified samples to the total number of samples.

[0131]

[0132]

[0133] Figure 4(a) to Figure 4(f) is a comparison of the OA and Kappa coefficients corresponding to the four classifiers in different landscape groups; Figure 3(a) and Figure 3(b) are comparisons of classification accuracy based on different landscape groups and classification schemes;

[0134] Generally speaking, crop classification accuracy can be evaluated using confusion matrix. Overall accuracy (OA) and Kappa coefficient, two key indicators to measure whether the classification results can meet user requirements, were selected for study.

[0135] Based on the number of crop types, i.e., compositional heterogeneity (the number of crop types in each area is different), the degree of configurational heterogeneity (if the number of crop types in two areas is the same, but the landscapes constructed by their different distributions are different), the number of landscape groups and the location of each area in the landscape group are determined; the best features and algorithms under different heterogeneities are determined. Areas with similar compositional heterogeneity and configurational heterogeneity are grouped into the same landscape group.

[0136] Generally speaking, landscape heterogeneity includes compositional heterogeneity and configurational heterogeneity. In the present invention, two indexes, HOI (homogeneity index) and SPLIT (splitting index), are selected for the label setting of farmland landscape areas, representing compositional and configurational heterogeneity, respectively. HOI refers to the richness and uniformity of land cover types, and SPLIT refers to the complexity of the spatial structure of land cover types in the corresponding landscape.

[0137] The HOI index is used to obtain the richness and uniformity of the land cover types in the area. Richness (Menhinick) is used to describe the richness and complexity of land use types on the basis of solving the land use classification problem. It reflects the number of land use types and the proportion of various types. It is expressed by the formula:

[0138] Shannon uniformity reflects the uniformity of the distribution of the number of different species.

[0139]

[0140] Where n is the number of crop types in the study area, m is the number of crop types in a certain area, and P is the purity of crop i in the study area. When there is only one crop type and one patch in the landscape, HOI equals 1. A higher HOI means less compositional heterogeneity, and vice versa.

[0141] At the same time, the SPLIT index is also used to obtain the complexity of the spatial structure of land cover types in the regional landscape. The calculation formula is as follows:

[0142]

[0143] Where A is the total landscape area, a ij is the area of ​​crop i in plot j, and k is the number of patches in crop i. When the landscape consists of a single patch, SPLIT = 1. When the patches contained in the landscape are smaller, the segmentation is larger. When the landscape is maximally subdivided, the segmentation value reaches the maximum value. Lower SPLIT means less configuration heterogeneity, and vice versa.

[0144] In each region, non-crop pixels were masked by cropland maps generated from GLC10 (Global Land Cover 10 Classes: a global land cover map with 10-meter resolution). All regions have the same size in order to compare their heterogeneity.

[0145] The relationship between landscape heterogeneity and crop classification accuracy was explored using Pearson correlation analysis.

[0146]

[0147] To construct a lookup table (Table 1) for rapid search of optimal features and algorithms under different heterogeneities, the 60 regions were divided into six landscape groups; the number of landscape groups and the location of each region were determined based on the number of crop types, the degree of configuration heterogeneity (compared to the average SPLIT for a certain number of crop types), and the visual differences of the study area.

[0148] Table 1 Lookup table

[0149]

[0150] Figure 5(a) to Figure 5(d) is the correlation coefficient between the crop classification accuracy difference and HOI or SPLIT.

[0151] Determine the best features and algorithms under different heterogeneities, including: judging the heterogeneity of each group's characterization composition and characterization configuration heterogeneity based on the experimental results of the example. Calculate the average HOI and SPLIT of each group, compare the results, and determine the best features and classifier algorithms.

[0152] HOI and SPLIT were calculated based on the mapping result with the highest classification accuracy in each region. Therefore, it can be considered that the true landscape heterogeneity of all regions is obtained. In each region, non-crop pixels were masked by the cropland map generated from GLC10. All regions had the same size in order to compare their heterogeneity. The relationship between landscape heterogeneity and crop classification accuracy was explored using Pearson correlation analysis.

[0153] In order to construct a lookup table to quickly search for the best features and algorithms under different heterogeneities, the 60 areas were divided into six landscape patterns according to the SPLIT value of the configuration heterogeneity degree and the number of crop types in each landscape area.

[0154] Individual crops with a landscape area configuration heterogeneity level of SPLIT < 436 (Group 1);

[0155] Individual crops with a landscape area configuration heterogeneity level of SPLIT>436 (Group 2);

[0156] Two crop types with a landscape area configuration heterogeneity degree SPLIT < 496 (Group 3);

[0157] Two crop types with a landscape area configuration heterogeneity degree SPLIT>496 (Group 4);

[0158] three crop types with a landscape area configuration heterogeneity degree of SPLIT < 623 (Group 5);

[0159] Three crop types with landscape area configuration heterogeneity degree SPLIT>623 (Group 6).

[0160] The number of landscape patterns and the location of each area were determined based on the number of crop types, the degree of configurational heterogeneity (compared to the average SPLIT for a certain number of crop types) and the visual differentiation of the study area.

[0161] Determine the best features and algorithms for different heterogeneities. According to the experimental results of the example, Group 1, Group 3, and Group 5 can better characterize the compositional heterogeneity, while Group 2, Group 4, and Group 6 can better characterize the configurational heterogeneity. Calculate the average HOI and SPLIT of each group, analyze the results, and determine the best features and classifier algorithms. Figure 6(a) to Figure 6(d) The difference is configurational heterogeneity and compositional inhomogeneity.

[0162] Embodiment 2

[0163] This embodiment provides a crop classification feature optimization system for heterogeneous farmland landscape areas;

[0164] The crop classification feature optimization system for heterogeneous farmland landscape areas includes:

[0165] A lookup table formulation module is configured to: formulate a lookup table, and store the best feature set, the best classifier and the corresponding landscape pattern label in the lookup table;

[0166] A search module is configured to: obtain a landscape mode of a farmland landscape area to be queried, and output an optimal feature set and an optimal classifier corresponding to the current landscape mode according to the records in the search table;

[0167] The classification module is configured to use the best feature set and the best classifier to complete the crop classification task of the landscape pattern of the farmland landscape area to be queried.

[0168] It should be noted that the above-mentioned lookup table formulation module, search module and classification module correspond to steps S101 to S103 in Embodiment 1, and the examples and application scenarios implemented by the above-mentioned modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0169] Embodiment 3

[0170] This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory so that the electronic device executes the method described in the above embodiment one.

[0171] Embodiment 4

[0172] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is completed.

[0173] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for optimizing crop classification characteristics in heterogeneous farmland landscape areas, characterized by: include: Formulate a lookup table, and store the best feature set, the best classifier, and the corresponding landscape pattern label in the lookup table; Obtain the landscape mode of the farmland landscape area to be queried, and output the best feature set and the best classifier corresponding to the current landscape mode according to the records in the lookup table; The best feature set and the best classifier are used to complete the crop classification task of the landscape pattern of the farmland landscape area to be queried; The optimal feature set and the optimal classifier; the acquisition process includes: Acquire remote sensing images of P different landscape pattern labels in a known farmland landscape area; Preprocessing the remote sensing images to generate a sample set; extracting L types of image features from the remote sensing images of each landscape mode in the sample set; Based on L kinds of image features, M kinds of feature classification schemes with known landscape pattern labels are formulated; Based on the best feature subset under each landscape mode label, N classification algorithms are classified respectively to obtain the optimal classifier under each landscape mode label; Based on the optimal classifier under each landscape pattern label, the M feature classification schemes of the known landscape pattern labels are classified respectively to obtain the optimal feature classification scheme; the features corresponding to the optimal feature classification scheme are taken as the optimal feature set; Based on L kinds of image features, M kinds of feature classification schemes with known landscape pattern labels are formulated; including: Plan A, all 40 features; Solution B, the best feature subset corresponding to the current landscape mode label; Scheme C, the reflectance of 10 spectral bands of Sentinel-2; Scheme D is a combination of the reflectance of 10 spectral bands of Sentinel-2 and 14 additional vegetation indices; Scheme E, a combination of the reflectance of 10 spectral bands and 16 texture features of Sentinel-2; The optimal feature subset corresponding to the current landscape mode label is determined by: All 40 image features are input into the random forest algorithm at the same time, and the weights of different features are output; Sort the features in descending order of weight; Select several features with the highest ranking, and the combination is called the best feature subset.

2. The method for optimizing crop classification characteristics for heterogeneous farmland landscape areas according to claim 1, characterized in that: Acquire remote sensing images of P different landscape mode labels of a known farmland landscape area; wherein different landscape mode labels include: Individual crops with a landscape area configuration heterogeneity level SPLIT less than 436; Individual crops with a landscape area configuration heterogeneity level SPLIT greater than 436; The degree of landscape area configuration heterogeneity SPLIT is less than 496 for the two crop types; The degree of landscape area configuration heterogeneity SPLIT was greater than 496 for the two crop types; The degree of landscape area configuration heterogeneity SPLIT is less than 623 for three crop types; There are three crop types with a landscape area configuration heterogeneity degree SPLIT greater than 623.

3. The method for optimizing crop classification characteristics for heterogeneous farmland landscape areas according to claim 1, characterized in that: For each landscape pattern in the sample set, L types of image features are extracted from the remote sensing images; specifically, they include: Spectral features and texture features are extracted from the remote sensing images of each landscape pattern in the sample set; The spectral features and texture features include: 40 features; The 40 features refer to: reflectance of 10 spectral bands of Sentinel-2, 14 additional vegetation indices and 16 texture features.

4. The method for optimizing crop classification characteristics for heterogeneous farmland landscape areas according to claim 1, characterized in that: Based on the best feature subset under each landscape mode label, N classification algorithms are classified respectively to obtain the optimal classifier under each landscape mode label; specifically, the following are included: The best feature subsets under the current landscape mode label are input into N classification algorithms respectively to obtain N classification accuracies, and the algorithm with the highest classification accuracy is selected as the optimal classifier under the current landscape mode label; Based on the optimal classifier under each landscape pattern label, the M feature classification schemes of known landscape pattern labels are classified respectively to obtain the optimal feature classification scheme; specifically, it includes: The M feature classification schemes are respectively input into the optimal classifier under the current landscape mode label to obtain M classification accuracies, and the feature classification scheme with the highest classification accuracy is selected as the optimal feature classification scheme; among which, the classification accuracy is measured by the OA index and the Kappa index.

5. A crop classification feature optimization system for heterogeneous farmland landscape areas, characterized by: include: A lookup table formulation module is configured to: formulate a lookup table, and store the best feature set, the best classifier and the corresponding landscape pattern label in the lookup table; A search module is configured to: obtain a landscape mode of a farmland landscape area to be queried, and output an optimal feature set and an optimal classifier corresponding to the current landscape mode according to the records in the search table; A classification module is configured to: use an optimal feature set and an optimal classifier to complete a crop classification task of a landscape pattern of a farmland landscape area to be queried; The optimal feature set and the optimal classifier; the acquisition process includes: Acquire remote sensing images of P different landscape pattern labels in a known farmland landscape area; Preprocessing the remote sensing images to generate a sample set; extracting L types of image features from the remote sensing images of each landscape mode in the sample set; Based on L kinds of image features, M kinds of feature classification schemes with known landscape pattern labels are formulated; Based on the best feature subset under each landscape mode label, N classification algorithms are classified respectively to obtain the optimal classifier under each landscape mode label; Based on the optimal classifier under each landscape pattern label, the M feature classification schemes of the known landscape pattern labels are classified respectively to obtain the optimal feature classification scheme; the features corresponding to the optimal feature classification scheme are taken as the optimal feature set; Based on L kinds of image features, M kinds of feature classification schemes with known landscape pattern labels are formulated; including: Plan A, all 40 features; Solution B, the best feature subset corresponding to the current landscape mode label; Scheme C, the reflectance of 10 spectral bands of Sentinel-2; Scheme D is a combination of the reflectance of 10 spectral bands of Sentinel-2 and 14 additional vegetation indices; Scheme E, a combination of the reflectance of 10 spectral bands and 16 texture features of Sentinel-2; The optimal feature subset corresponding to the current landscape mode label is determined by: All 40 image features are input into the random forest algorithm at the same time, and the weights of different features are output; Sort the features in descending order of weight; Select several features with the highest ranking, and the combination is called the best feature subset.

6. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; as well as a processor for executing the computer readable instructions, When the computer-readable instructions are executed by the processor, the method described in any one of claims 1 to 4 is executed.

7. A storage medium, characterized in that: The computer-readable instructions are non-transitory stored, wherein when the non-transitory computer-readable instructions are executed by a computer, the method according to any one of claims 1 to 4 is performed.