A crop grading method and system based on dynamic optimization of hyperspectral features
Through the selection of dynamic dimensionality reduction and target vegetation index, the computational complexity and overfitting problems caused by excessive hyperspectral remote sensing data are solved, and the efficiency and accuracy of crop grading are improved.
Patent Information
- Application Number
- CN202510377533.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2045-03-28
AI Technical Summary
The high dimensions of hyperspectral remote sensing data lead to dimensional disasters, computational complexity and overfitting problems, affecting the efficiency and accuracy of crop grading.
By calculating multiple vegetation indexes of crops, initial clustering and reclustering are performed, the cell distance matrix is calculated using the vegetation index distance and spectral distance, the dimensionality reduction amplitude is dynamically determined, the dimensionality reduction of hyperspectral images is achieved, and the target vegetation index is determined from multiple vegetation indexes, and the crop grading map is obtained through semantic segmentation.
It effectively solves the computational complexity and overfitting problems caused by excessive hyperspectral data dimensions, improves the speed and accuracy of crop grading, and reduces the impact of redundant information on the results.
Smart Images

Figure CN119888508B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent grading, and in particular to a crop grading method and system based on dynamic optimization of hyperspectral features. Background Art
[0002] Crop growth monitoring is the core link of precision agriculture and smart agriculture. Its core goal is to provide a scientific basis for field management decisions through real-time and dynamic crop growth status assessment. Traditional crop growth monitoring mainly relies on manual field surveys, which is costly, inefficient, difficult to meet the needs of large-scale and high-frequency monitoring, and has great subjectivity. With the development of remote sensing technology, people try to use multispectral remote sensing technology to judge the growth of crops. However, the spectral resolution of multispectral remote sensing is low, it is difficult to capture the subtle differences in crop biochemical parameters, and it is easily disturbed by environmental factors such as soil background and atmospheric conditions. Hyperspectral remote sensing technology has ultra-high spectral resolution and rich spectral information. Hyperspectral data can reveal the biochemical characteristics and physiological state differences of crop canopies and leaves through continuous spectral curves. For example, the reflectance characteristics of healthy leaves in the visible-near infrared band are significantly different from those of stressed plants. However, hyperspectral data has a high dimensionality, generates a large amount of data, and contains a lot of redundant information. This redundant information may affect the final result, and the calculation process requires a lot of resources, which will affect the efficiency of recognition. Summary of the invention
[0003] The hyperspectral features have many dimensions, which may easily lead to dimensional disasters, complicated calculation processes, overfitting and other problems. In a first aspect, the present invention provides a crop classification method based on dynamic optimization of hyperspectral features, the method comprising the following steps:
[0004] The hyperspectral image of the crop is used to calculate multiple vegetation indexes of the crop, and the hyperspectral image pixels are initially clustered according to the multiple vegetation indexes, and the hyperspectral image pixel where the cluster center is located is taken as the center;
[0005] Calculating the vegetation index distance of the pixel, calculating the pixel distance matrix using the vegetation index distance and the spectral distance, re-clustering the pixels using the center and the pixel distance matrix, establishing a corresponding relationship between the initial clustering center and the re-clustering center, calculating the intersection of the pixels of the clusters with corresponding centers in the initial clustering and the re-clustering, determining the dimensionality reduction amplitude according to the intersection, and performing dimensionality reduction on the hyperspectral image;
[0006] The target vegetation index is determined from multiple vegetation indices, and the target vegetation index and the hyperspectral image after dimensionality reduction are used for semantic segmentation to obtain a crop classification map.
[0007] Preferably, the pixel distance matrix is calculated by using the vegetation index distance and the spectral distance, specifically:
[0008] The vegetation index distance is used to obtain the vegetation index distance matrix, and the spectral distance is used to obtain the spectral distance matrix;
[0009] The vegetation index distance matrix and the spectral distance matrix were normalized respectively;
[0010] The pixel distance matrix is obtained by performing weighted summation on the vegetation index distance matrix and the spectral distance matrix bit by bit.
[0011] Preferably, the step of determining the dimensionality reduction amplitude according to the intersection and performing dimensionality reduction on the hyperspectral image is specifically as follows:
[0012] For each band, calculate the silhouette coefficients of all intersections, retain the bands whose silhouette coefficients are greater than a threshold, obtain the average value of the silhouette coefficients of the retained bands, and obtain the reduced number of dimensions based on the average value;
[0013] The reserved bands in the hyperspectral image are reduced in dimension to the number of dimensions.
[0014] Preferably, the determining of the target vegetation index from the plurality of vegetation indices is specifically:
[0015] Calculating the contour coefficient of the vegetation index using the intersection, and calculating the proportion of the reserved bands used in the vegetation index calculation, and sorting the vegetation index according to the contour coefficient of the vegetation index and the proportion of the reserved bands;
[0016] The number of selected vegetation indices is determined based on the reduced number of dimensions and the target number of dimensions, and vegetation indices of the number of vegetation indices are selected from the sorted vegetation indices as target vegetation indices.
[0017] Preferably, the vegetation indices are sorted according to the contour coefficients of the vegetation indices and the proportion of the reserved bands, specifically:
[0018] The importance of the vegetation index is calculated using the silhouette coefficient of the vegetation index and the proportion of the retained bands;
[0019] The vegetation indices are sorted in descending order of importance.
[0020] In a second aspect, the present invention provides a crop grading system based on dynamic optimization of hyperspectral features, the system comprising the following modules:
[0021] An initial clustering module is used to calculate multiple vegetation indexes of crops using hyperspectral images of crops, perform initial clustering on hyperspectral image pixels according to the multiple vegetation indexes, and take the hyperspectral image pixel where the cluster center is located as the center;
[0022] A dimension reduction module is used to calculate the vegetation index distance of the pixel, calculate the pixel distance matrix using the vegetation index distance and the spectral distance, re-cluster the pixels using the center and the pixel distance matrix, establish a corresponding relationship between the initial cluster center and the re-cluster center, calculate the intersection of the pixels of the clusters with corresponding centers in the initial cluster and the re-cluster, determine the dimension reduction amplitude according to the intersection, and perform dimension reduction on the hyperspectral image;
[0023] The crop classification module is used to determine the target vegetation index from multiple vegetation indices, and to obtain a crop classification map by performing semantic segmentation using the target vegetation index and the hyperspectral image after dimensionality reduction.
[0024] Preferably, the pixel distance matrix is calculated by using the vegetation index distance and the spectral distance, specifically:
[0025] The vegetation index distance is used to obtain the vegetation index distance matrix, and the spectral distance is used to obtain the spectral distance matrix;
[0026] The vegetation index distance matrix and the spectral distance matrix were normalized respectively;
[0027] The pixel distance matrix is obtained by performing weighted summation on the vegetation index distance matrix and the spectral distance matrix bit by bit.
[0028] Preferably, the step of determining the dimensionality reduction amplitude according to the intersection and performing dimensionality reduction on the hyperspectral image is specifically as follows:
[0029] For each band, calculate the silhouette coefficients of all intersections, retain the bands whose silhouette coefficients are greater than a threshold, obtain the average value of the silhouette coefficients of the retained bands, and obtain the reduced number of dimensions based on the average value;
[0030] The reserved bands in the hyperspectral image are reduced in dimension to the number of dimensions.
[0031] Preferably, the determining of the target vegetation index from the plurality of vegetation indices is specifically:
[0032] Calculating the contour coefficient of the vegetation index using the intersection, and calculating the proportion of the reserved bands used in the vegetation index calculation, and sorting the vegetation index according to the contour coefficient of the vegetation index and the proportion of the reserved bands;
[0033] The number of selected vegetation indices is determined based on the reduced number of dimensions and the target number of dimensions, and vegetation indices of the number of vegetation indices are selected from the sorted vegetation indices as target vegetation indices.
[0034] Preferably, the vegetation indices are sorted according to the contour coefficients of the vegetation indices and the proportion of the reserved bands, specifically:
[0035] The importance of the vegetation index is calculated using the silhouette coefficient of the vegetation index and the proportion of the retained bands;
[0036] The vegetation indices are sorted in descending order of importance.
[0037] In order to solve the problem that hyperspectral images are prone to the curse of dimensionality, the present invention uses vegetation index distance and spectral distance to calculate the pixel distance matrix, and then obtains pixel clusters based on the results of clustering according to the vegetation index. The characteristics of the pixel clusters are used to dynamically determine the reduced dimensions, thereby achieving dynamic dimensionality reduction. This not only retains the bands that play a key role in crop grading, but also reduces the impact of other bands on grading accuracy, thereby improving the speed and accuracy of grading. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is a flow chart of Embodiment 1;
[0039] Figure 2 Schematic diagram of hyperspectral image channels;
[0040] Figure 3 It is a schematic diagram of the reflectivity variation curve of two pixels;
[0041] Figure 4 This is a schematic diagram of pixel clustering using vegetation index;
[0042] Figure 5 is a schematic diagram of the intersection;
[0043] Figure 6 Schematic diagram of retaining channels in hyperspectral images;
[0044] Figure 7 Schematic diagram of grading crops in fixed plots. DETAILED DESCRIPTION
[0045] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Figure 1 A first embodiment of the present invention is shown, Figure 1 The crop classification method based on dynamic optimization of hyperspectral features shown includes the following steps:
[0048] S1, using the hyperspectral image of the crop to calculate multiple vegetation indices of the crop, performing initial clustering on the hyperspectral image pixels according to the multiple vegetation indices, and taking the hyperspectral image pixel where the cluster center is located as the center;
[0049] Hyperspectral images are remote sensing images that contain hundreds of narrow bands. Each band (wavelength) corresponds to a channel of the remote sensing image. For example, if there are 100 bands, the hyperspectral remote sensing image contains 100 channels. Figure 2 A hyperspectral image with five bands or channels is shown. In a remote sensing image, each pixel records the reflectance of crops in different bands. Hyperspectral images are acquired through airborne sensors such as AVIRIS. Due to the different growth states of crops, the reflectance of different bands is different. Hyperspectral images can be used to judge the growth of crops. Figure 3 is the reflectance curve corresponding to two pixels of the same crop with different growth conditions. Figure 3 The yellow curve in the middle is the reflectance curve when the crops grow well, and the blue curve is the reflectance curve when the crops grow normally.
[0050] In the past, most people judged from the perspective of vegetation index, but many bands were not used by the vegetation index, such as the normalized difference vegetation index NDVI, which only used the near-infrared band and the red light band. Since hyperspectral images contain many bands, the vegetation index of each pixel can be calculated using the channels in the hyperspectral image. The vegetation index includes but is not limited to NDVI, EVI, SAVI, etc. The multiple vegetation index values of each pixel are combined into a feature vector to form a multidimensional data set. For example, the vegetation index feature vector of a pixel is [NDVI=0.7, EVI=0.5, SAVI=0.6], and all pixels constitute an M×N×D vegetation index feature matrix, where M is the height of the hyperspectral image, N is the width of the hyperspectral image, and D is the number of vegetation indices. Clustering methods such as K-Means or DBSCAN are used to cluster the vegetation index feature vectors of all pixels. Figure 4 The figure shows a schematic diagram of pixel clustering using three vegetation indicators. Figure 4 All green dots constitute cluster L1, all yellow dots constitute cluster M1, and all blue dots constitute cluster N1. Each dot is a pixel. Since the number of pixels in the hyperspectral image is the same as the number of elements in the vegetation index feature matrix, and the two are corresponding, clustering the elements in the vegetation index feature matrix can obtain the pixel clustering of the hyperspectral image, and the hyperspectral image pixel corresponding to the cluster center is taken as the center.
[0051] S2, calculating the vegetation index distance of the pixel, calculating the pixel distance matrix using the vegetation index distance and the spectral distance, re-clustering the pixels using the center and the pixel distance matrix, establishing a corresponding relationship between the initial clustering center and the re-clustering center, calculating the intersection of the pixels of the clusters with corresponding centers in the initial clustering and the re-clustering, determining the dimensionality reduction amplitude according to the intersection, and performing dimensionality reduction on the hyperspectral image;
[0052] Each pixel has a vegetation index, and the vegetation index distance between pixels can be calculated by the vegetation index. Since the vegetation index is a crop growth state parameter calculated based on the hyperspectral band, even if two pixels are far apart in space, if the vegetation index is the same, the crop growth states reflected by the two pixels are relatively similar. The present invention further uses the vegetation index distance and the spectral distance to calculate the pixel distance matrix. Specifically, the vegetation index distance matrix is obtained by using the vegetation index distance, and the spectral distance matrix is obtained by using the spectral distance; the vegetation index distance matrix and the spectral distance matrix are normalized respectively; and the vegetation index distance matrix and the spectral distance matrix are weighted and summed bit by bit to obtain the pixel distance matrix. After obtaining the vegetation index distance of two pixels, a vegetation index distance matrix is constructed, wherein the size of the vegetation index distance matrix is (M×N)×(M×N); similarly, after obtaining the spectral distance of two pixels, a spectral distance matrix is constructed, wherein the spectral distance matrix and the vegetation index distance matrix have the same size, the vegetation index distance matrix and the spectral distance matrix are normalized respectively, and then weighted sum is performed bit by bit to obtain the pixel distance matrix, wherein the pixel distance matrix and the spectral distance matrix and the vegetation index distance matrix have the same size. In one embodiment, the vegetation index distance is calculated by using Euclidean distance, Manhattan distance, etc. for the vegetation index feature vector; the spectral distance is calculated by using Euclidean distance, Manhattan distance, etc. for the spectral feature vector of the pixel. In another embodiment, the spectral distance is calculated by using the spectral information divergence-spectral angle method.
[0053] After obtaining the pixel distance matrix, the pixel distance is also obtained, and the pixels are re-clustered using the center and the pixel distance. In one embodiment, the center is kept unchanged during the re-clustering process; in another embodiment, the pixels are re-clustered using the hyperspectral feature vector of the pixel to obtain the same number of clusters and cluster centers as the initial clustering, and the correspondence between the initial clustering cluster center and the re-clustering cluster center is established based on the distance between the initial clustering and the cluster center in the re-clustering. Wherein, the initial clustering is clustered based on the vegetation index feature vector of the pixel, and the re-clustering is clustered based on the hyperspectral feature vector of the pixel. In one embodiment, the correspondence between the initial clustering cluster center and the re-clustering cluster center is established based on the distance between the initial clustering and the cluster center in the re-clustering, and the association relationship is established between the cluster center in the initial clustering with the closest distance and the cluster center in the re-clustering, where the distance between the cluster center in the initial clustering and the re-clustering is obtained by weighting the distance between the hyperspectral feature vectors of the two cluster centers and the distance between the vegetation index feature vectors.
[0054] Regardless of the initial clustering or re-clustering, each center represents a cluster, and there is at least one pixel in the cluster. The intersection of the cluster corresponding to the initial clustering cluster center and the cluster corresponding to the re-clustering cluster center with corresponding relationships is calculated.
[0055] The pixels in the intersection are more similar. Figure 5 shows the distribution of the intersection, Figure 5 The cluster L2 composed of green dots is the intersection of cluster L1 and the re-clustered cluster corresponding to cluster L1. The cluster M2 composed of yellow dots is the intersection of cluster M1 and the re-clustered cluster corresponding to cluster M1. The cluster N2 composed of blue dots is the intersection of cluster N1 and the re-clustered cluster corresponding to cluster N1. Figure 4 , 5 It can be seen that after the intersection operation, the elements of clusters L2, M2 and N2 are less than those of the initial clusters L1, M1 and N1. This is because the intersection eliminates the possible noise influence. In one embodiment, the dimensionality reduction amplitude is determined according to the intersection and the dimensionality reduction is performed on the hyperspectral image, specifically:
[0056] For each band, calculate the silhouette coefficients of all intersections, retain the bands whose silhouette coefficients are greater than a threshold, obtain the average value of the silhouette coefficients of the retained bands, and obtain the reduced number of dimensions based on the average value;
[0057] The reserved bands in the hyperspectral image are reduced in dimension to the number of dimensions.
[0058] The hyperspectral image includes spectral feature maps of multiple bands. On each band, the position and value of the pixel in the intersection on the spectral feature map are obtained, so that the clustering and cluster of this band are obtained. A cluster of the band is the intersection. The contour coefficients of all intersections, that is, all clusters of this band, are calculated. The higher the contour coefficient, the better the classification effect, which means that this band is more effective in distinguishing crops of different levels. The value of the contour coefficient is [-1, 1]. The bands with a contour coefficient greater than a threshold are retained. In one embodiment, the threshold is 0 or the average or weighted average of the contour coefficients of all bands.
[0059] Calculate the average value of the contour coefficients of all the retained bands. For example, if there are 3 retained bands and the contour coefficients are 0.8, 0.7 and 0.9 respectively, the average value is 0.8. The larger the average value, the better the effect of each band on the classification. For example, if the average value is 1, it means that all bands can complete the classification well. At this time, the effect of different bands on the classification is small, and the hyperspectral image can be reduced to a lower dimension. On the contrary, if the average value is large, it means that the effect of each band on the classification is not very good. At this time, it is preferred to reduce the hyperspectral image to a relatively high dimension. The average value is used to obtain the reduced number of dimensions. In one embodiment, the number of channels of the hyperspectral image, that is, the number of bands of the original hyperspectral image, for example, 100, is obtained. The product of the number of channels of the hyperspectral image and the average value is used as the number of dimensions to be reduced. For example, if the average value is 0.8, the number of dimensions to be reduced is 80, and the dimension after dimensionality reduction is 20, that is, the hyperspectral image is reduced from 100 dimensions to 20 dimensions. In one embodiment, the upper and lower intervals of the dimension after dimensionality reduction are set. If the dimension after dimensionality reduction exceeds the upper and lower intervals, the upper and lower intervals are taken. For example, the upper and lower intervals are 20-30. If the dimension after dimensionality reduction is 19, 20 is taken. Of course, the method of obtaining the number of dimensions after reduction based on the average value is not limited to the above method. The number of dimensions after reduction can also be determined by the interval in which the average value is located, or the average value is weighted and then multiplied with the original dimension as the number of dimensions to be reduced. Since the clustering effect of non-retained bands is not good, the channel feature map corresponding to the non-retained bands in the hyperspectral image is deleted. For example, if the non-retained band is band 4, the 4th channel in the hyperspectral image is deleted. Figure 6 The reserved channels are obtained after deleting the channels from the hyperspectral image, and then the hyperspectral image is reduced to the dimension number, for example, 20.
[0060] S3, determining the target vegetation index from multiple vegetation indices, and using the target vegetation index and the hyperspectral image after dimensionality reduction to perform semantic segmentation to obtain a crop classification map.
[0061] The scale and number of channels of the input features of the trained semantic segmentation model are fixed, while the dimension after dimensionality reduction in step S2 is dynamically changing. The target vegetation index is further selected from the vegetation index, and the sum of the number of selected target vegetation indexes and the dimension after dimensionality reduction is equal to the number of channels required by the semantic segmentation model. For example, the number of channels required by the semantic segmentation model is 25, and the dimension of the hyperspectral image after dimensionality reduction is 20, then 5 target index indices are determined from multiple index indices. In one embodiment, the silhouette coefficient of the target vegetation index is calculated, and the target index is selected in descending order of the silhouette coefficient.
[0062] In yet another embodiment, all vegetation indices are used as target vegetation indices, and the target vegetation indices and the hyperspectral image after dimensionality reduction are concatenated by channel and then reduced to the dimension required by the semantic segmentation model by using convolution or the like.
[0063] The reserved bands can better represent different clusters than the non-reserved bands. In another embodiment, the target vegetation index is determined from the multiple vegetation indices, specifically:
[0064] Calculating the contour coefficient of the vegetation index using the intersection, and calculating the proportion of the reserved bands used in the vegetation index calculation, and sorting the vegetation index according to the contour coefficient of the vegetation index and the proportion of the reserved bands;
[0065] The number of selected vegetation indices is determined based on the reduced number of dimensions and the target number of dimensions, and vegetation indices of the number of vegetation indices are selected from the sorted vegetation indices as target vegetation indices.
[0066] The possibility that the pixels in the intersection are noise is low. The intersection is used to calculate the silhouette coefficient of each vegetation index and the proportion of retained bands used in the vegetation index calculation. The proportion of retained bands is the proportion of retained bands in all bands used to calculate the vegetation index. For example, the calculation of the vegetation index NVDI uses the near-infrared band and the red light band. If in S2, the near-infrared band is a retained band and the infrared band is a non-reserved band, the proportion of retained bands is 0.5.
[0067] If the proportion of the reserved bands is large, and the reserved bands play a greater role in distinguishing crops of different grades, then the role of the vegetation index is also large. The vegetation index is sorted according to the contour coefficient of the vegetation index and the proportion of the reserved bands. Preferably, the importance of the vegetation index is calculated using the contour coefficient of the vegetation index and the proportion of the reserved bands; the vegetation index is sorted in descending order of the importance. In one embodiment, the sum or product of the two is used as the importance of the vegetation index. The dimension number of the hyperspectral image after dimensionality reduction has been obtained in S2, and the dimension number required by the input of the semantic segmentation model, that is, the target dimension number, is fixed. The target dimension number minus the dimension number after dimensionality reduction of the hyperspectral image is the number of vegetation indexes k that need to be selected. The first k vegetation indexes are selected from the sorted vegetation indexes as the target vegetation indexes. For example, if the number of selected vegetation indexes is 3, then starting from the first vegetation index after sorting, 3 vegetation indexes are selected as the target vegetation indexes, and the feature map of the target vegetation index is further obtained. It is spliced with the hyperspectral image after dimensionality reduction according to the dimension to obtain the feature map to be input into the semantic segmentation model. Among them, semantic segmentation models include but are not limited to U-Net, SegNet, etc. Figure 7 A schematic diagram of grading crops in a fixed plot is shown, wherein light green indicates good growth, yellow indicates medium growth, and blue indicates poor growth.
[0068] In a second aspect, the present invention provides a crop grading system based on dynamic optimization of hyperspectral features, the system comprising the following modules:
[0069] An initial clustering module is used to calculate multiple vegetation indexes of crops using hyperspectral images of crops, perform initial clustering on hyperspectral image pixels according to the multiple vegetation indexes, and take the hyperspectral image pixel where the cluster center is located as the center;
[0070] A dimension reduction module is used to calculate the vegetation index distance of the pixel, calculate the pixel distance matrix using the vegetation index distance and the spectral distance, re-cluster the pixels using the center and the pixel distance matrix, establish a corresponding relationship between the initial cluster center and the re-cluster center, calculate the intersection of the pixels of the clusters with corresponding centers in the initial cluster and the re-cluster, determine the dimension reduction amplitude according to the intersection, and perform dimension reduction on the hyperspectral image;
[0071] The crop classification module is used to determine the target vegetation index from multiple vegetation indices, and to obtain a crop classification map by performing semantic segmentation using the target vegetation index and the hyperspectral image after dimensionality reduction.
[0072] Preferably, the pixel distance matrix is calculated by using the vegetation index distance and the spectral distance, specifically:
[0073] The vegetation index distance is used to obtain the vegetation index distance matrix, and the spectral distance is used to obtain the spectral distance matrix;
[0074] The vegetation index distance matrix and the spectral distance matrix were normalized respectively;
[0075] The pixel distance matrix is obtained by performing weighted summation on the vegetation index distance matrix and the spectral distance matrix bit by bit.
[0076] Preferably, the step of determining the dimensionality reduction amplitude according to the intersection and performing dimensionality reduction on the hyperspectral image is specifically as follows:
[0077] For each band, calculate the silhouette coefficients of all intersections, retain the bands whose silhouette coefficients are greater than a threshold, obtain the average value of the silhouette coefficients of the retained bands, and obtain the reduced number of dimensions based on the average value;
[0078] The reserved bands in the hyperspectral image are reduced in dimension to the number of dimensions.
[0079] Preferably, the determining of the target vegetation index from the plurality of vegetation indices is specifically:
[0080] Calculating the contour coefficient of the vegetation index using the intersection, and calculating the proportion of the reserved bands used in the vegetation index calculation, and sorting the vegetation index according to the contour coefficient of the vegetation index and the proportion of the reserved bands;
[0081] The number of selected vegetation indices is determined based on the reduced number of dimensions and the target number of dimensions, and vegetation indices of the number of vegetation indices are selected from the sorted vegetation indices as target vegetation indices.
[0082] Preferably, the vegetation indices are sorted according to the contour coefficients of the vegetation indices and the proportion of the reserved bands, specifically:
[0083] The importance of the vegetation index is calculated using the silhouette coefficient of the vegetation index and the proportion of the retained bands;
[0084] The vegetation indices are sorted in descending order of importance.
[0085] Through the description of the above implementation methods, technicians in this field can clearly understand that each implementation method can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it, and other embodiments may also be used. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A crop classification method based on dynamic optimization of hyperspectral features, characterized in that: The method comprises the following steps: The hyperspectral image of the crop is used to calculate multiple vegetation indexes of the crop, and the hyperspectral image pixels are initially clustered according to the multiple vegetation indexes, and the hyperspectral image pixel where the cluster center is located is taken as the center; Calculating the vegetation index distance of the pixel, calculating the pixel distance matrix using the vegetation index distance and the spectral distance, re-clustering the pixels using the center and the pixel distance matrix, establishing a corresponding relationship between the initial clustering center and the re-clustering center, calculating the intersection of the pixels of the clusters with corresponding centers in the initial clustering and the re-clustering, determining the dimensionality reduction amplitude according to the intersection, and performing dimensionality reduction on the hyperspectral image; The target vegetation index is determined from multiple vegetation indices, and the target vegetation index and the hyperspectral image after dimensionality reduction are used for semantic segmentation to obtain a crop classification map.
2. The method according to claim 1, characterized in that The pixel distance matrix is calculated by using the vegetation index distance and the spectral distance, specifically: The vegetation index distance is used to obtain the vegetation index distance matrix, and the spectral distance is used to obtain the spectral distance matrix; The vegetation index distance matrix and the spectral distance matrix were normalized respectively; The pixel distance matrix is obtained by performing weighted summation on the vegetation index distance matrix and the spectral distance matrix bit by bit.
3. The method according to claim 1, characterized in that The dimensionality reduction range is determined according to the intersection and the dimensionality reduction is performed on the hyperspectral image, specifically: For each band, calculate the silhouette coefficients of all intersections, retain the bands whose silhouette coefficients are greater than a threshold, obtain the average value of the silhouette coefficients of the retained bands, and obtain the reduced number of dimensions based on the average value; The reserved bands in the hyperspectral image are reduced in dimension to the number of dimensions.
4. The method according to claim 3, characterized in that The determining of the target vegetation index from the plurality of vegetation indices is specifically as follows: Calculating the contour coefficient of the vegetation index using the intersection, and calculating the proportion of the reserved bands used in the vegetation index calculation, and sorting the vegetation index according to the contour coefficient of the vegetation index and the proportion of the reserved bands; The number of selected vegetation indices is determined based on the reduced number of dimensions and the target number of dimensions, and vegetation indices of the number of vegetation indices are selected from the sorted vegetation indices as target vegetation indices.
5. The method according to claim 4, characterized in that The vegetation index is sorted according to the vegetation index contour coefficient and the reserved band ratio, specifically: The importance of the vegetation index is calculated using the silhouette coefficient of the vegetation index and the proportion of the retained bands; The vegetation indices are sorted in descending order of importance.
6. A crop grading system based on dynamic optimization of hyperspectral features, characterized in that: The system includes the following modules: An initial clustering module is used to calculate multiple vegetation indexes of crops using hyperspectral images of crops, perform initial clustering on hyperspectral image pixels according to the multiple vegetation indexes, and take the hyperspectral image pixel where the cluster center is located as the center; A dimension reduction module is used to calculate the vegetation index distance of the pixel, calculate the pixel distance matrix using the vegetation index distance and the spectral distance, re-cluster the pixels using the center and the pixel distance matrix, establish a corresponding relationship between the initial cluster center and the re-cluster center, calculate the intersection of the pixels of the clusters with corresponding centers in the initial cluster and the re-cluster, determine the dimension reduction amplitude according to the intersection, and perform dimension reduction on the hyperspectral image; The crop classification module is used to determine the target vegetation index from multiple vegetation indices, and to obtain a crop classification map by performing semantic segmentation using the target vegetation index and the hyperspectral image after dimensionality reduction.
7. The system according to claim 6, characterized in that The pixel distance matrix is calculated by using the vegetation index distance and the spectral distance, specifically: The vegetation index distance is used to obtain the vegetation index distance matrix, and the spectral distance is used to obtain the spectral distance matrix; The vegetation index distance matrix and the spectral distance matrix were normalized respectively; The pixel distance matrix is obtained by performing weighted summation on the vegetation index distance matrix and the spectral distance matrix bit by bit.
8. The system according to claim 6, characterized in that The dimensionality reduction range is determined according to the intersection and the dimensionality reduction is performed on the hyperspectral image, specifically: For each band, calculate the silhouette coefficients of all intersections, retain the bands whose silhouette coefficients are greater than a threshold, obtain the average value of the silhouette coefficients of the retained bands, and obtain the reduced number of dimensions based on the average value; The reserved bands in the hyperspectral image are reduced in dimension to the number of dimensions.
9. The system according to claim 8, characterized in that The determining of the target vegetation index from the plurality of vegetation indices is specifically as follows: Calculating the contour coefficient of the vegetation index using the intersection, and calculating the proportion of the reserved bands used in the vegetation index calculation, and sorting the vegetation index according to the contour coefficient of the vegetation index and the proportion of the reserved bands; The number of selected vegetation indices is determined based on the reduced number of dimensions and the target number of dimensions, and vegetation indices of the number of vegetation indices are selected from the sorted vegetation indices as target vegetation indices.
10. The system according to claim 9, characterized in that The vegetation index is sorted according to the vegetation index contour coefficient and the reserved band ratio, specifically: The importance of the vegetation index is calculated using the silhouette coefficient of the vegetation index and the proportion of the retained bands; The vegetation indices are sorted in descending order of importance.
Citation Information
Patent Citations
Histogram clustering-based fusion model of high space-time normalized difference vegetation index NDVI
CN112052720A
Crop disease and pest identification method and system based on hyperspectral remote sensing image
CN116912678A