A Hyperspectral Image Classification Method Based on Dictionary Optimization and Kernel Joint Sparse Representation

Through principal component analysis and morphological processing, and combined with the kernel sparse representation method, the problem of insufficient utilization of spatial information in hyperspectral image classification is solved, and the classification accuracy is improved.

CN114283333BActive Publication Date: 2025-07-25CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111568513.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2025-07-25
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

The existing hyperspectral image classification methods fail to make full use of spatial information and spectral information, resulting in insufficient classification accuracy, especially when spectral information is mixed and training samples are limited.

Method used

Feature images are extracted through principal component analysis, morphological processing and superpixel segmentation are performed, dictionary sets are optimized, and the kernel sparse representation method is combined with superpixel edges and neighborhood constraints are used for classification.

Benefits of technology

The classification accuracy of hyperspectral images is improved, and by combining spatial information and spectral information, the dictionary composition is optimized, and the distinction and classification accuracy of images are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114283333B_ABST
    Figure CN114283333B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of remote sensing image processing, and particularly relates to a hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation, which includes extracting the principal component feature map of the hyperspectral image and performing morphological processing based on reconstruction; performing superpixel segmentation on the image after morphological processing; extracting LBP texture features, and taking the pixels at the feature positions in the middle of each superpixel as the dictionary alternative subset; in each class of dictionary alternative subsets, taking each pixel as a dictionary, calculating the residuals of other pixels in this class of dictionary alternative subsets and averaging them, arranging them in ascending order, and the pixels corresponding to the top 5% of the average values form the optimized dictionary subset; obtaining the classification result of the image using the kernel joint sparse representation method under the dual constraints of the superpixel edge and the fixed neighborhood; the present invention can effectively improve the image classification 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 remote sensing image processing, and particularly to a hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation. Background Art

[0002] Hyperspectral images (HSIs) are high-dimensional images with a large amount of data, which can reflect the spatial and spectral information of ground objects and are widely used in remote sensing, environmental monitoring, urban mapping, target recognition and other fields. In recent decades, HSI classification has been a hot research topic in the field of remote sensing. The core idea is to classify each spectral pixel by using spectral information and the extracted meaningful spatial information. To achieve this goal, many methods have been developed. Support vector machines (SVMs), polynomial logistic regression (MLR), neural networks, and artificial immune networks are all widely used classifiers and have good classification effects. However, these classification methods only make full use of spectral information and do not consider spatial information. Therefore, noisy classification results are often obtained. There are mainly two reasons for this situation. One is that the spectral information of a certain type of pixel is easily mixed with the spectral information of other types of pixels, and the other is that the number of available training samples is often very limited.

[0003] To further improve the classification accuracy, based on the assumption that pixels in the same local area often represent the same ground object and have similar spectral characteristics, a large number of studies have attempted to combine spectral information and spatial information for classification, such as methods based on composite kernels, clustering, and segmentation. The classification methods that combine spatial and spectral information can be roughly divided into three categories: preprocessing-based, postprocessing-based, and comprehensive classification methods. Although the classification methods that combine spatial and spectral information can make full use of spatial information to promote the improvement of classification accuracy, they ignore the optimization problem of the dictionary. In the sparse representation classification method, selecting typical dictionary atoms can play a greater role in further improving the classification accuracy. In traditional sparse representation classification algorithms, atoms are randomly selected from each class of samples to form a dictionary set. Although this selection method has a low algorithm complexity, it cannot well guarantee the sparse reconstruction of the pixels to be measured, thus affecting the classification accuracy of the image. Summary of the Invention

[0004] To solve the above problems, the present invention proposes a hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation, including the following steps:

[0005] S1. Input the hyperspectral image, extract the first principal component feature map of the hyperspectral image by using the principal component analysis method, and extract the LBP texture feature on the first principal component feature map;

[0006] After extracting the LBP texture features, perform morphological processing based on reconstruction on the first principal component feature map, and perform superpixel segmentation on the morphologically processed image to obtain multiple superpixels;

[0007] S3. Use the pixels at the LBP texture feature positions in the middle of each superpixel as the dictionary alternative subset;

[0008] S4. Use all the pixels in the dictionary alternative subset as the dictionary, calculate the average residual of all the dictionaries in the dictionary alternative subset and arrange them in ascending order, select the pixels corresponding to the top 5% of the average residual to form the optimized dictionary subset, and form the dictionary set by combining all the dictionary subsets;

[0009] S5. Obtain the adaptive neighborhood subset of the central pixel under the dual constraints of the superpixel edge and the fixed neighborhood, use the kernelized orthogonal matching pursuit method to calculate the sparse coefficient subset corresponding to the adaptive neighborhood subset, and obtain the classification result of the hyperspectral image based on the reconstruction error result of the calculated sparse coefficient subset.

[0010] Further, the morphological processing based on reconstruction includes erosion and dilation operations. The erosion and dilation operations on the first principal component feature map of the hyperspectral image are expressed as:

[0011]

[0012]

[0013] where I represents the first principal component feature map, B represents the structural element, represents the reflection of B, Θ represents the erosion operation, represents the dilation operation.

[0014] Further, the process of using the pixels at the LBP texture feature positions in the middle of each superpixel as the dictionary alternative set in step S3 includes:

[0015] S11. Select a superpixel P from the multiple superpixels;

[0016] S12. Calculate the column number corresponding to each pixel coordinate in the superpixel P;

[0017] S13. Find the pixel corresponding to the middle column number in the superpixel P, that is, the middle pixel p center,e , and use the n×n neighborhood of the middle pixel and the pixels at the corresponding positions of the LBP texture feature to form the pixel dictionary alternative subset D e ,

[0018] S14. Obtain the pixel dictionary alternative subsets of the remaining superpixels according to steps S12 and S13, and form the dictionary alternative set by combining all the pixel dictionary alternative subsets

[0019] Among them, P = [p1, p2,..., p i ,..., p L , pi i represents the i-th pixel in the superpixel P, L represents the total number of pixels in the superpixel P, and H represents the pixel set corresponding to the position of the extracted LBP texture feature. represents the n×n neighborhood of the middle pixel p center,e . C represents the category of the dictionary candidate set, and R T×N represents the dictionary candidate set matrix, T represents the number of spectral dimensions, and N represents the total number of pixels in the dictionary candidate set.

[0020] Further, in step S12, the formula for calculating the column number l i,j corresponding to the coordinate of each pixel in the superpixel is:

[0021] l i,j = xw × yy j - (xw - xx i );

[0022] Among them, (xx i , yy j ) represents the pixel coordinate, and xw represents the number of rows of the size of the hyperspectral image.

[0023] Further, step S4 includes:

[0024] When taking a pixel in a type of dictionary candidate set as the dictionary, calculate the residual between other pixels and the dictionary through the kernel sparse representation method

[0025] Calculate the average residual γ cj of the current dictionary;

[0026] Calculate the average residuals when the remaining pixels in the current dictionary candidate set are used as the dictionary, and obtain the average residual set γ c , cn c represents the total number of pixels in the current dictionary candidate set;

[0027] Arrange the average residual values in the average residual set in ascending order, and take the pixels corresponding to the top 5% of the average residual values in the average residual set as the optimized dictionary set;

[0028] Calculate the average residual sets of other types of dictionary candidate sets to obtain the corresponding dictionary subsets, and all the dictionary subsets form the dictionary set D, D = [D1,..., D c ,..., D C ∈ RT×M , where C represents the category of the dictionary, R T×M represents the matrix size of the dictionary set, T represents the number of spectral dimensions, and M represents the total number of pixels in the dictionary set.

[0029] Furthermore, all pixels in the superpixel are sequentially used as the central pixel, and an adaptive neighborhood set of the central pixel is obtained under the dual constraints of the superpixel edge and the fixed neighborhood, including:

[0030] S21. Select a pixel in the superpixel as the central pixel, and obtain the n×n neighborhood pixel set of the current central pixel;

[0031] S22. Determine whether the color label of the central pixel is the same as that of the neighborhood pixels in the neighborhood pixel set;

[0032] S23. If they are the same, it meets the dual constraints, and calculate the similarity between the current neighborhood pixel and the current central pixel. If they are different, it does not meet the dual constraints, select the next neighborhood pixel and return to step S22;

[0033] S24. After all neighborhood pixels are judged, calculate the weights of the neighborhood pixels that meet the dual constraints. If the weight is greater than the threshold, record the neighborhood pixel;

[0034] S25. Combine all the recorded neighborhood pixels to form the adaptive neighborhood pixel subset Y of the current central pixel SA ;

[0035] S26. Select the next pixel in the superpixel as the central pixel, and obtain its neighborhood pixel set, then return to step S22;

[0036] S27. Obtain the adaptive neighborhood pixel subsets when all pixels are used as the central pixel, and combine them to form the adaptive neighborhood set.

[0037] Furthermore, the formula for calculating the similarity v i,j in step S23 is:

[0038] v i,j =(1 - λ)ds(p i ,q i,j )+λs(p i ,q i,j );

[0039]

[0040]

[0041] where p i represents the central pixel, q i,jDenote the j-th neighborhood pixel of the central pixel, λ is the coefficient for balancing spatial similarity and spectral similarity, ds(p i ,q i,j ) represents the spatial similarity of neighborhood pixels, s(p i ,q i,j ) represents the cosine similarity of spectra, (xx i ,yy i ) represents the spatial coordinates of the central pixel p i , (xx i,j ,yy i,j ) are the spatial coordinates of the j-th neighborhood pixel of p i , p i,t and q i,j,t respectively represent the spectral components of the central pixel and the adjacent pixel in the t-th dimension.

[0042] Further, the calculation formula for the weight of the neighborhood pixel satisfying the dual constraint is:

[0043]

[0044] Among them, represents the weight of each neighborhood pixel satisfying the dual constraint, v i,j represents the similarity between the i-th central pixel and its j-th neighborhood pixel satisfying the dual constraint, and J represents the total number of neighborhood pixels of the i-th central pixel satisfying the dual constraint.

[0045] Further, the sparse coefficient subset A SA = [α1,...,α cnt corresponding to the adaptive neighborhood subset is optimized, and the optimization formula is:

[0046]

[0047] Using the Gaussian kernel function for calculation, it is expressed as:

[0048]

[0049] Among them, K represents the sparsity level, represents the optimized sparse coefficient subset, K() represents the Gaussian kernel function, Y SA represents the adaptive neighborhood subset, D represents the dictionary set, represents the transpose matrix of the sparse coefficient subset A SA .

[0050] Further, according to the reconstruction error of the optimized sparse coefficient subset, the reconstruction error is expressed as:

[0051]

[0052] The dictionary type corresponding to the minimum value in the reconstruction error is the classification to which the hyperspectral image belongs, which is expressed as:

[0053] class(y ct ) = argmin i=1,...,C γ i (y ct );

[0054] Among them, γ i represents the reconstruction error, K() represents the Gaussian kernel function, C represents the dictionary type, y ct represents the central pixel of the adaptive neighborhood subset, Y SA represents the adaptive neighborhood subset, D i represents the dictionary of the i-th class, represents the subset of sparse coefficients corresponding to the i-th optimized adaptive neighborhood subset.

[0055] Advantages of the present invention:

[0056] The present invention uses a classification method that combines spatial information and spectral information, and performs reconstruction-based morphological operations on the extracted principal component feature map using a rectangular structural element, introducing spatial structure features for each pixel, improving the spatial distinguishability of each pixel, facilitating edge feature extraction, formulating a method for selecting more typical dictionary atoms, optimizing the composition of the dictionary, and obtaining the classification result of the hyperspectral image using the kernel joint sparse representation method under the dual constraints of the superpixel edge and the fixed neighborhood, improving the classification accuracy of the hyperspectral image. Description of the Drawings

[0057] Figure 1 is the flowchart of the hyperspectral image classification based on dictionary optimization and kernel joint sparse representation of the present invention. Detailed Embodiments

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0059] A hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation, as Figure 1 shown, includes the following steps:

[0060] S1. Use the principal component analysis method to extract the first principal component of the hyperspectral image data, and extract the LBP texture feature on the first principal component feature map;

[0061] After extracting the LBP texture features, perform morphological processing based on reconstruction on the first principal component feature map, and perform superpixel segmentation on the morphologically processed image to obtain multiple superpixels;

[0062] S3. Take the pixels at the LBP texture feature positions in the middle of each superpixel as the dictionary alternative subset;

[0063] S4. All pixels in the dictionary alternative subset are used as the dictionary. Calculate the average residual of all dictionaries in this dictionary alternative subset and arrange them in ascending order. Select the pixels corresponding to the top 5% of the average residuals to form the optimized dictionary subset, and form a dictionary set with all the dictionary subsets;

[0064] S5. Obtain the adaptive neighborhood set of the central pixel under the dual constraints of the superpixel edge and the fixed neighborhood. Use the kernelized orthogonal matching pursuit method to calculate the sparse coefficient subset corresponding to the adaptive neighborhood subset. According to the reconstruction error of the calculated sparse coefficient subset, obtain the classification result of the hyperspectral image through the reconstruction error result.

[0065] In one embodiment, perform morphological operations based on reconstruction on the extracted first principal component feature map using a rectangular structuring element, introduce spatial structure features for each pixel, improve the spatial distinguishability of each pixel, and facilitate edge feature extraction. The operations of eroding and dilating the first principal component feature map using a rectangular structuring element are respectively:

[0066]

[0067]

[0068] Among them, I represents the first principal component feature map, B represents the structuring element, represents the reflection of B, Θ represents the erosion operation, represents the dilation operation; the erosion operation can separate objects at thin points, the dilation operation can fill small holes inside the object, and the opening and closing operations of the image can be realized through the erosion and dilation operations.

[0069] Specifically, the morphological opening operation O(I) and closing operation ρ(I) are respectively:

[0070]

[0071]

[0072] Preferably, use an improved watershed algorithm to segment superpixels, extract LBP texture features, and select the pixels at the feature positions in the middle of each superpixel as the dictionary alternative set.

[0073] After superpixel segmentation, the entire image is divided into more than a dozen blocks, each of which is sampled with different numbers to represent. Here, the color scale e is a representation method, indicating that the superpixel with the color scale e is selected. In this way, the positions of the selected superpixels are distinguished.

[0074] In one embodiment, the pixel set corresponding to the extracted LBP texture features at the feature positions is H = [h1, h2,..., h S , where S represents the total number of pixels at all feature positions. In the superpixel segmentation map, a superpixel P = [p1, p2,..., p L with the color scale e is selected, where p i represents the i-th pixel in the superpixel, and L represents the total number of pixels in the superpixel with the color scale e.

[0075] Calculate the column number l i , yy j corresponding to the coordinates (xx i,j ) of each pixel in the superpixel:

[0076] l i,j = xw × yy j - (xw - xx i );

[0077] Among them, xw represents the number of rows of the size of the hyperspectral image. For example, for a hyperspectral image dataset of 145 * 145 * 200, 145 * 145 means that the image has 145 rows and 145 columns, with a total of 145 * 145 pixels, and 200 means that each pixel has a dimension of 200, that is, each pixel is a 200-dimensional vector.

[0078] Find the pixel corresponding to the middle column number of the superpixel with the color scale e according to this formula, that is, the middle pixel p center,e , and form an alternative subset of the pixel dictionary Among them represents the n × n neighborhood of the middle pixel p center,e . Use this rule to calculate and form a dictionary alternative set in all superpixels

[0079] Specifically, the dictionary alternative set is expressed as C represents the category of the dictionary alternative set, R T×N represents the matrix size of the dictionary alternative set, T represents the number of spectral dimensions, N is the total number of pixels in the dictionary alternative set, represents the c-th category of dictionary alternative set, and n c represents the total number of pixels in the current dictionary alternative set.

[0080] Furthermore, in each category of dictionary alternative set , let each pixel dcj All are used as dictionaries, and the remaining pixels are used as test pixels. The residuals of other pixels in the current dictionary candidate subset are calculated by the kernel sparse representation method. The test pixel can be expressed as:

[0081] φ(y ci ) = φ(d cj )α cji , i = 1,... j - 1, j + 1..., n c ;

[0082] Among them, φ() represents the kernel mapping, and y ci represents the other pixels in cj except d cji is the sparse coefficient, which can be obtained by solving the error constraint problem as follows:

[0083]

[0084] where K is the set sparsity, which represents the number of non-zero coefficients, and the OMP algorithm is used to solve it in the present invention.

[0085] Preferably, the residual between each test pixel in the c-th dictionary candidate set cj and the dictionary d can be expressed as:

[0086]

[0087] The residual cj between each test pixel and the current dictionary d After the calculation is completed, the average residual γ cj of the current dictionary d cj is calculated and expressed as:

[0088]

[0089] Further, the average residual when the remaining pixels in the dictionary candidate set are used as the dictionary is solved. Then, the average residual set when all pixels in the c-th dictionary candidate set are used as the dictionary is The average residual values of the pixels in the average residual set are arranged in ascending order, and the pixels corresponding to the first 5% of the average residual values in the average residual set are taken as the optimized dictionary subset of the c-th dictionary candidate set

[0090] Calculate the remaining dictionary candidate sets according to the above formula for solving the residuals, and obtain the remaining optimized dictionary subsets to form the optimized dictionary set. Then, the optimized dictionary set D is expressed as:

[0091] D = [D1,..., D c ,..., D C ∈ R T×M ;

[0092] where C represents the category of the dictionary, R T×M represents the matrix size of the dictionary set, T represents the number of spectral dimensions, and M represents the total number of pixels in the dictionary set.

[0093] In one embodiment, all pixels in the superpixel are used as central pixels, and an adaptive neighborhood set of the central pixels is obtained under the dual constraints of the superpixel edge and the fixed neighborhood, including:

[0094] S21. Select a pixel in the superpixel as the central pixel, and obtain the n×n neighborhood pixel set of the current central pixel;

[0095] S22. Determine whether the color label of the central pixel is the same as that of the neighborhood pixels in the neighborhood pixel set;

[0096] S23. If they are the same, it meets the dual constraints, and calculate the similarity between the current neighborhood pixel and the current central pixel. If they are different, it does not meet the dual constraints, select the next neighborhood pixel and return to step S22;

[0097] S24. After all neighborhood pixels are judged, calculate the weights of the neighborhood pixels that meet the dual constraints. If the weight is greater than the threshold, record the neighborhood pixel;

[0098] S25. Combine all the recorded neighborhood pixels to form the adaptive neighborhood pixel subset Y SA = [y1,..., y cnt , where cnt is the number of pixels in the adaptive neighborhood subset;

[0099] S26. Select the next pixel in the superpixel as the central pixel, and obtain its neighborhood pixel subset, then return to step S22;

[0100] S27. Obtain the adaptive neighborhood pixel subsets when all pixels are used as central pixels, and combine them to form the adaptive neighborhood set.

[0101] Preferably, select a superpixel P = [p1, p2,..., p L with a color label of e in multiple superpixel maps, where p iDenote the \(i\)-th pixel in superpixel \(P\), \(L\) represents the total number of pixels in superpixel \(P\) with color label \(e\). All pixels in superpixel \(P\) are used as central pixels, and the \(i\)-th pixel in superpixel \(P\) is selected as central pixel \(p\). i,center , whose \(n\times n\) neighborhood pixel set is \(Q\). i =\([q i,1 ,q i,2 ,\(\cdots\),q i,n×n \), where \(q i,j represents the \(j\)-th neighborhood pixel of central pixel \(p i,center \), and the corresponding color label is \(b i,j \). Then judge whether the color label \(b i,j is the same as \(e\). If they are the same, calculate the similarity \(v i,j \) between this neighborhood pixel and the central pixel and store it. The similarity calculation rule is:

[0102] v i,j =(1 - \(\lambda\))ds(p i ,q i,j )+\(\lambda\)s(p i ,q i,j ), \(j = 1,2,\cdots,J\);

[0103]

[0104]

[0105] where \(\lambda\) is a coefficient to balance the spatial similarity and spectral similarity, \(ds(p i ,q i,j ) represents the spatial similarity of the neighborhood pixel, \(s(p i ,q i,j ) represents the cosine similarity of the spectrum, \((xx i ,yy i ) are the spatial coordinates of central pixel \(p i,center \), \((xx i,j ,yy i,j ) are the spatial coordinates of the \(j\)-th adjacent pixel of \(p i,center \), \(p i,t represents the spectral component of the central pixel in the \(t\)-th dimension, and \(q i,j,t represents the spectral component of the \(j\)-th neighborhood pixel in the \(t\)-th dimension.

[0106] Preferably, after all the similarities of the neighborhood pixels that meet the dual constraint conditions are calculated, calculate the weight of each neighborhood pixel of the current central pixel that meets the dual constraints, which is expressed as:

[0107]

[0108] where, Denote the weight of each neighborhood pixel that satisfies the double constraints as v i,j Denote the similarity between the i-th central pixel and its j-th neighborhood pixel that satisfies the double constraints, and J denotes the total number of neighborhood pixels of the i-th central pixel that satisfy the double constraints.

[0109] When the weight is greater than the set weight threshold, record the neighborhood pixel in the current adaptive neighborhood subset, calculate the adaptive neighborhood subsets of the remaining pixels according to the similarity calculation formula and the weight judgment rule, and form an adaptive neighborhood set by combining all the adaptive neighborhood subsets.

[0110] Preferably, the sparse coefficient set corresponding to the adaptive neighborhood subset is denoted as A SA =[α1,...,α cnt , and the optimization problem of the sparse coefficient subset can be expressed as:

[0111]

[0112] The optimization problem of the sparse coefficient mapped to the kernel space can be written as:

[0113]

[0114] It can be solved by the kernelized OMP algorithm.

[0115] The objective function part of the optimized sparse coefficient subset can be calculated as:

[0116]

[0117] The present invention uses a Gaussian kernel function, and there is:

[0118]

[0119] Then the objective function part can be rewritten as:

[0120]

[0121] Where K() represents the kernel function, which is calculated using the Gaussian kernel function, K represents the sparsity level, denotes the optimized sparse coefficient subset, Y SA denotes the adaptive neighborhood subset, D denotes the dictionary set, denotes the sparse coefficient subset A SA transpose matrix.

[0122] According to the reconstruction error of the obtained optimized sparse coefficient subset, calculate the reconstruction error of the pixels under each type of dictionary. The category corresponding to the dictionary with the smallest reconstruction error is the category of the pixel, which can be expressed as:

[0123]

[0124] where y ct represents the central pixel of the adaptive neighborhood subset, and Y SA represents the adaptive neighborhood subset.

[0125] The decision rule is:

[0126] class(y ct ) = argmin i=1,...,C γ i (y ct ).

[0127] where γ i represents the reconstruction error, K() represents the Gaussian kernel function, C represents the dictionary type, and D i represents the dictionary of the i-th class, represents the subset of sparse coefficients corresponding to the optimized i-th adaptive neighborhood subset.

[0128] Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A hyperspectral image classification method based on dictionary optimization for kernel joint sparse representation, characterized in that It includes the following steps: S1. Input the hyperspectral image, extract the first principal component feature map of the hyperspectral image by using the principal component analysis method, and extract the LBP texture features on the first principal component feature map; S2. After extracting the LBP texture features, perform morphological processing based on reconstruction on the first principal component feature map, and perform superpixel segmentation on the image after morphological processing to obtain multiple superpixels; S3. Take the pixels at the LBP texture feature positions in the middle of each superpixel as the dictionary alternative subsets; S4. All the pixels in the dictionary alternative subsets are used as dictionaries, calculate the average residual of all the dictionaries in the dictionary alternative subset and sort them in ascending order, select the pixels corresponding to the first 5% of the average residual values to form the optimized dictionary subset, and form a dictionary set with all the dictionary subsets; S5. Obtain the adaptive neighborhood set of the central pixel under the double constraints of the superpixel edge and the fixed neighborhood, use the kernelized orthogonal matching pursuit method to calculate the sparse coefficient subset corresponding to the adaptive neighborhood subset, and obtain the classification result of the hyperspectral image according to the reconstruction error calculated by the sparse coefficient subset; All the pixels in the superpixel are sequentially used as the central pixel, and the adaptive neighborhood set of the central pixel is obtained under the double constraints of the superpixel edge and the fixed neighborhood, including: S21. Select a pixel in the superpixel as the central pixel, and obtain the n×n neighborhood pixel set of the current central pixel; S22. Judge whether the color label of the central pixel is the same as that of the neighborhood pixels in the neighborhood pixel set; S23. If they are the same, it meets the double constraints, and calculate the similarity between the current neighborhood pixel and the current central pixel. If they are different, it does not meet the double constraints, and select the next neighborhood pixel and return to step S22; S24. After all the neighborhood pixels are judged, calculate the weights of the neighborhood pixels that meet the double constraints. If the weight is greater than the set weight threshold, record the neighborhood pixel; S25. Compose all the recorded neighborhood pixels into an adaptive neighborhood pixel subset Y of the current central pixel SA ; S26. Select the next pixel in the superpixel as the central pixel, and obtain its neighborhood pixel subset, and return to step S22; S27. Obtain the adaptive neighborhood pixel subsets when all the pixels are used as the central pixel, and form an adaptive neighborhood set with them; Sparse coefficient subset A corresponding to the adaptive neighborhood subset SA = [α1,..., α cnt , optimize the sparse coefficient subset, and the optimization formula is: If the Gaussian kernel function is used for calculation, it is expressed as: Among them, K represents the sparsity level, represents the optimized sparse coefficient subset, K() represents the Gaussian kernel function, Y SA represents the adaptive neighborhood subset, D represents the dictionary set, represents the sparse coefficient subset A SA is the transpose matrix of; According to the reconstruction error of the optimized sparse coefficient subset, the reconstruction error is expressed as: The dictionary type corresponding to the minimum value in the reconstruction error is the classification to which the hyperspectral image belongs, and it is expressed as: class(y ct ) = argmin i=1,...,C γ i (y ct ); Among them, γ i represents the reconstruction error, K() represents the Gaussian kernel function, C represents the dictionary type, y ct represents the central pixel of the adaptive neighborhood subset, Y SA represents the adaptive neighborhood subset, D i represents the dictionary of the i-th class, represents the subset of sparse coefficients corresponding to the optimized i-th adaptive neighborhood subset.

2. The hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation according to claim 1, characterized in that The morphological processing based on reconstruction includes erosion and dilation operations. The erosion and dilation operations are performed on the first principal component feature map of the hyperspectral image, and it is expressed as: Among them, I represents the first principal component feature map, and B represents the structural element. represents the image of B, and Θ represents the erosion operation. represents the dilation operation.

3. A hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation according to claim 1, characterized in that The process of taking the pixels at the LBP texture feature positions in the middle of each superpixel as the dictionary alternative subsets in step S3 includes: S11. Select a superpixel P from multiple superpixels; S12. Calculate the column numbers corresponding to the coordinates of each pixel in the superpixel P; S13. Find the pixel corresponding to the middle column number of the superpixel P, that is, the middle pixel p center,e , and use the pixels at the corresponding positions of the n×n neighborhood of the middle pixel and the LBP texture features to form an alternative subset D of the pixel dictionary e , S14. Obtain the alternative subsets of the pixel dictionaries for the remaining superpixels according to steps S12 and S13, and form an alternative set of dictionaries by combining all the alternative subsets of the pixel dictionaries Among them, P = [p1, p2,..., p i ,..., p L , pi i represents the i-th pixel in the superpixel P, L represents the total number of pixels in the superpixel P, and H represents the pixel set corresponding to the position of the extracted LBP texture feature. represents the n×n neighborhood of the intermediate pixel p center,e . C represents the category of the dictionary candidate set, R T×N represents the dictionary candidate set matrix, T represents the number of spectral dimensions, and N represents the total number of pixels in the dictionary candidate set.

4. A hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation according to claim 3, characterized in that, In step S12, calculate the column number l corresponding to the coordinates of each pixel in the superpixel i,j The formula for which is: l i,j = xw × yy j -(xw - xx i ); Among them, (xx i , yy j ) represents the pixel coordinates, and xw represents the number of rows of the size of the hyperspectral image.

5. A hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation according to claim 1, characterized in that Step S4 includes: When a pixel in a set of dictionary candidates is used as the dictionary, the residual between other pixels and the dictionary is calculated by the kernel sparse representation method Calculate the average residual γ of the current dictionary cj ; Calculate the average residual when the remaining pixels in the current dictionary candidate set are used as the dictionary, and obtain the set γ of the average residuals of all pixels in the current dictionary candidate set c , cn c represents the total number of pixels in the current dictionary candidate set; The average residual values in the average residual set are sorted in ascending order, and the pixels corresponding to the first 5% of the average residual values in the average residual set are taken as the optimized dictionary subset; Calculate the average residual set of the alternative sets of other types of dictionaries to obtain the corresponding dictionary subsets. All the dictionary subsets form a dictionary set D, D = [D1,..., D c ,..., D C ∈ R T×M , where C represents the category of the dictionary, R T×M represents the matrix size of the dictionary set, T represents the number of spectral dimensions, and M represents the total number of pixels in the dictionary set.

6. A hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation according to claim 1, characterized in that Calculate the similarity v in step S23 i,j The formula for which is: v i,j =(1 - λ)ds(p i ,q i,j ) + λs(p i ,q i,j ); Among them, p i represents the central pixel, q i,j represents the j-th neighboring pixel of the central pixel, λ is the coefficient for balancing the spatial similarity and spectral similarity, ds(p i , q i,j ) represents the spatial similarity of the neighboring pixel, s(p i , q i,j ) represents the cosine similarity of the spectrum, (xx i , yy i ) represents the spatial coordinates of the central pixel p i , (xx i,j , yy i,j ) are the spatial coordinates of the j-th neighboring pixel of p i , and p i,t and q i,j,t respectively represent the spectral components of the central pixel and the adjacent pixel in the t-th dimension.

7. A hyperspectral image classification method based on dictionary optimization and kernel joint sparse representation according to claim 1, characterized in that The calculation formula for the weights of the neighborhood pixels that meet the double constraints is: Among them, represents the weight of each neighborhood pixel that satisfies the double constraints, v i,j represents the similarity between the i-th central pixel and the j-th neighborhood pixel that satisfies the double constraints for it, and J represents the total number of neighborhood pixels of the i-th central pixel that satisfy the double constraints.