A hyperspectral image classification method
By fusing multi-scale Retinex features with the original spectral features, the problem of low classification accuracy of hyperspectral images is solved, and high-precision classification is achieved under the condition of limited training samples.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Chinese People's Liberation Army Cyberspace Force Information Engineering University
- Filing Date
- 2022-10-20
- Publication Date
- 2026-05-19
AI Technical Summary
Under the condition of limited training samples, the classification accuracy of hyperspectral images in existing technologies is low, especially due to insufficient global and detailed information.
Retinex features are extracted by setting different standard deviations of Gaussian functions, multi-scale fusion is performed, and the features are concatenated with the original spectral features to form fused spatial-spectral features, which are then classified using a support vector machine.
It improves the classification accuracy of hyperspectral images, especially when the training samples are limited, significantly enhancing the accuracy and robustness of classification.
Smart Images

Figure CN116310471B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image classification, specifically relating to a hyperspectral image classification method. Background Technology
[0002] Because acquiring labeled samples from hyperspectral images is time-consuming and labor-intensive, feature extraction is necessary to improve the classification accuracy of hyperspectral images. However, using only spectral features to distinguish different land features has limitations. In hyperspectral images, adjacent pixels are highly likely to belong to the same class. Therefore, introducing spatial information can yield a more accurate land feature classification map, i.e., combining spatial and spectral features for hyperspectral image classification.
[0003] Because hyperspectral images are three-dimensional data cubes, their three-dimensional spatial-spectral features can be directly extracted. To ensure adaptability to different hyperspectral data, deep learning methods are typically used for hyperspectral image classification. While deep learning methods can improve the classification performance of hyperspectral images, under conditions of limited training samples, the features used for classification themselves also have a significant impact on the accuracy of hyperspectral image classification. If the classification features do not contain sufficient global and detailed information, it will also lead to low hyperspectral image classification accuracy. Summary of the Invention
[0004] The purpose of this invention is to provide a hyperspectral image classification method to solve the problem of low accuracy in hyperspectral image classification under the condition of limited training samples in the prior art.
[0005] To achieve the above objectives, the present invention provides a hyperspectral image classification method, comprising the following steps:
[0006] 1) Obtain the original spectral features of the hyperspectral image to be classified, and perform Retinex features on the hyperspectral image by setting at least two different Gaussian function standard deviations to obtain at least two different scales of Retinex features;
[0007] 2) The obtained Retinex features at different scales are fused to form the multi-scale fusion features of the hyperspectral image to be classified;
[0008] 3) The multi-scale fusion features of the hyperspectral image to be classified are fused with the original spectral features of the image to obtain the fused spatial-spectral features of the hyperspectral image;
[0009] 4) Input the fused spatial-spectral features into the classifier to classify the hyperspectral images.
[0010] When the Retinex feature scale is small, local details of the original band are more prominent; when the scale is large, it can reflect global image features and the image colors are more natural, but the influence of surrounding pixels on a particular pixel becomes smaller, resulting in less retention of image detail and weaker image contrast. Therefore, this method fuses Retinex features at different scales, which can take into account both global and detail features of hyperspectral images. Thus, the features used for classification contain more image information, improving classification accuracy.
[0011] Furthermore, the standard deviation of the Gaussian function set in step 1) includes the optimal standard deviation of the Gaussian function, which refers to extracting Retinex features according to the standard deviation of the Gaussian function to achieve the highest classification accuracy of the classifier.
[0012] Furthermore, in step 1), the standard deviation of the Gaussian function is set to include three values: the standard deviation of the optimal Gaussian function and two adjacent values of the standard deviation of the optimal Gaussian function.
[0013] Furthermore, a support vector machine is used as the classifier.
[0014] Furthermore, to achieve higher classification accuracy, feature fusion is performed by splicing. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating the process of obtaining fused spatial-spectral features in an embodiment of the hyperspectral image classification method of the present invention;
[0016] Figure 2 This is a schematic diagram of labeled samples selected from the University of Pavia dataset in the comparative example of the present invention;
[0017] Figure 3 This is a schematic diagram of labeled samples selected from the Salinas dataset in the comparative example of the present invention;
[0018] Figure 4 This is a schematic diagram of the experimental results for different sigma values on the University of Pavia dataset in the comparative examples of this invention;
[0019] Figure 5 This is a schematic diagram of the experimental results for different sigma values on the Salinas dataset in the comparative examples of this invention;
[0020] Figure 6 These are the quantitative evaluation results of different methods for the University of Pavia dataset in the comparative examples of this invention;
[0021] Figure 7 This presents the quantitative evaluation results of different methods for the Salinas dataset in the comparative examples of this invention.
[0022] Figure 8a The above refers to the ground reality images corresponding to the University of Pavia dataset in the comparative examples of this invention.
[0023] Figure 8b The classification result of the University of Pavia dataset in the comparative example of this invention is obtained using the EMP classification method;
[0024] Figure 8c The classification result of the University of Pavia dataset in the comparative example of this invention is obtained using the Gabor texture feature classification method;
[0025] Figure 8d The classification result of the University of Pavia dataset in the comparative example of this invention is obtained using the 3DCAE classification method;
[0026] Figure 8e The classification result of the University of Pavia dataset in the comparative example of this invention is obtained using the VGG19 classification method;
[0027] Figure 8f The classification result of the University of Pavia dataset in the comparative example of this invention is obtained by using the CNN classification method;
[0028] Figure 8g The classification result of the University of Pavia dataset in the comparative example of this invention is obtained by using the FContNet classification method;
[0029] Figure 8h The classification result of the University of Pavia dataset in the comparative example of this invention is obtained by using the MRetinex classification method proposed in this invention.
[0030] Figure 9a The images shown are the actual ground images corresponding to the Salians dataset in the comparative examples of this invention.
[0031] Figure 9b The classification result of the Salians dataset in the comparative example of this invention obtained using the EMP classification method;
[0032] Figure 9c The classification result of the Salians dataset in the comparative example of this invention is obtained using the Gabor texture feature classification method;
[0033] Figure 9d The classification result of the Salians dataset in the comparative example of this invention is obtained using the 3DCAE classification method;
[0034] Figure 9e The classification result of the Salians dataset in the comparative example of this invention is obtained using the VGG19 classification method;
[0035] Figure 9f The classification result of the Salians dataset in the comparative example of this invention is obtained by using the CNN classification method;
[0036] Figure 9g The classification result of the Salians dataset in the comparative example of this invention is obtained by using the FContNet classification method;
[0037] Figure 9h The classification result of the Salians dataset in the comparative example of this invention is obtained by using the MRetinex classification method proposed in this invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0039] Examples of Hyperspectral Image Classification Methods
[0040] This embodiment provides a hyperspectral image classification method, the specific steps of which are as follows:
[0041] 1) Obtain the original spectral features of the hyperspectral image to be classified, and perform Retinex features on the hyperspectral image by setting at least two different Gaussian function standard deviations to obtain at least two different scales of Retinex features.
[0042] Retinex theory decomposes a given image S(x,y) into two distinct images: a reflected image R(x,y) and a luminance image L(x,y). An image can be viewed as a combination of an incident image and a reflected image. Incident light illuminates a reflecting object, and through reflection, the reflected light enters the human eye. Retinex features are the features corresponding to the reflected image R(x,y) that represent essential information. These features can reduce the influence of lighting factors on the image, thus enhancing the image's detail and revealing features that represent its essential information.
[0043] The Retinex theory is formally described as follows:
[0044] S(x,y)=R(x,y)·L(x,y)
[0045] The incident component is approximated by convolving the image with a Gaussian function, i.e.:
[0046] L(x,y)=S(x,y)*G(x,y)
[0047] The Retinex algorithm typically transforms the multiplicative expression S(x,y) = R(x,y)·L(x,y) into the logarithmic domain, i.e., transforms multiplication into addition. Therefore, the reflection image r(x,y) in the logarithmic domain can be represented as:
[0048]
[0049] r(x,y)=logS(x,y)-logL(x,y)
[0050] r(x,y)=logS(x,y)-log(S(x,y)*G(x,y))
[0051] Where G(x,y) is a Gaussian function, which can be expressed as:
[0052]
[0053] In the above formula, c is the standard deviation of the Gaussian function; λ is the normalization factor, whose values satisfy the following equation:
[0054] ∫∫G(x,y)dxdy=1
[0055] For hyperspectral images, reflectance images are first extracted band by band, and then reflectance images from different bands are stacked together to form Retinex features.
[0056] 2) The obtained Retinex features at different scales are fused to form the multi-scale fusion features of the hyperspectral image to be classified.
[0057] According to the above formula, the standard deviation c of the Gaussian function determines the scale of the Retinex feature. When c is small, the local details of the original band are more prominent. When c is large, the neighborhood range of the Gaussian function is large, the color is more natural, but the influence of other pixels around a certain pixel on this pixel is smaller. This will result in less preservation of image detail information and weak image contrast information.
[0058] To enhance feature extraction performance, such as Figure 1As shown, this embodiment selects three c values, corresponding to three different scales of Retinex features. More c values result in better feature extraction, but increase computational complexity. Therefore, in other embodiments, to balance classification accuracy and computational cost, the number of different c values should be limited to 3-5. After extracting Retinex features from the hyperspectral image at three different scales, the multi-scale Retinex features are then fused. The range of variation between the selected c values is sufficiently large, such as 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64, 128, and 256. Simply selecting values that are too large or too small will reduce the final classification effect. Typically, cross-validation can be used to select the optimal parameter from a large number of candidate c values. In a preferred embodiment, the optimal Gaussian function standard deviation and its two adjacent values are selected to extract Retinex features, obtaining three different scales of Retinex features for feature fusion. For example, if the optimal Gaussian function standard deviation is 2, parameters 2, 4, and 8 are selected for feature extraction and fusion.
[0059] In this embodiment, in order to obtain higher classification accuracy, a splicing method is used for fusion to obtain multi-scale fused Retinex features.
[0060] 3) The multi-scale fusion features of the hyperspectral image to be classified are fused with the original spectral features of the image to obtain the fused spatial-spectral features of the hyperspectral image.
[0061] After fusing Retinex features at multiple scales, the fused features are fused with the original spectral features again to form the final fused spatial-spectral features used for classification. In order to obtain higher classification accuracy, this embodiment also adopts a splicing method to fuse and obtain the fused spatial-spectral features.
[0062] 4) The fused spatial-spectral features are input into the classifier to classify the hyperspectral image. In this embodiment, a support vector machine is used as the classifier.
[0063] Comparative example:
[0064] To verify the effectiveness of the classification method, this comparative example uses two sets of real hyperspectral images for classification experiments. The first hyperspectral image is from the University of Pavia dataset, acquired by the ROSIS sensor, with a spatial resolution of 1.3 meters, a spectral range of 430–860 nm, 103 bands, and a data size of 610×340. To quantitatively evaluate different classification algorithms, the University of Pavia dataset was manually labeled with 9 land cover classes, totaling 42,776 labeled samples.
[0065] like Figure 2 As shown, in this comparative example, 48 labeled samples were randomly selected from each land cover class as training data, for a total of 432 labeled samples used for training, and the remaining samples were used as test data.
[0066] The second hyperspectral image is from the Salinas dataset, acquired by the AVIRIS sensor. It has a spatial resolution of 3 meters, a spectral range of 400–2500 nm, 204 effective bands, and a file size of 145×145. The Salinas dataset annotates 16 land cover classes, containing a total of 54,128 labeled samples. Figure 3 As shown, in this comparative example, 27 labeled samples were randomly selected from each type of land cover as training data, resulting in a total of 432 labeled samples available for training. The remaining samples were used as test data.
[0067] In this comparative example, the most widely used Support Vector Machine (SVM) was chosen as the classifier. Retinex only requires setting the parameter sigma. By selecting different sigma values, single-scale Retinex features corresponding to different sigma values were extracted from the two sets of hyperspectral images. These features were then concatenated and fused with the original spectral features before classification experiments were conducted. The experimental results for the two sets of hyperspectral images and data with different sigma values are shown in Table 1. Figure 4 and Figure 5 As shown in Table 1, among which... Figure 4 and Figure 5 The experimental results show that the sigma value has obvious local optima on both datasets. On the University of Pavia dataset (PU), a sigma of 32 achieves the highest classification accuracy, while on the Salinas dataset (SA), a sigma of 128 achieves the highest classification accuracy. Classification accuracy decreases when the sigma is greater or less than this value. This is because an excessively large sigma value leads to the loss of too much detailed information, thus reducing classification accuracy, while an excessively small sigma results in the inability to extract discriminative features, also leading to reduced classification accuracy.
[0068] Table 1
[0069] sigma 0.25 0.5 1 2 4 8 16 32 64 128 256 PU 83.05 79.25 85.84 87.81 90.78 92.46 92.87 94.26 92.20 88.29 84.20 SA 89.21 88.44 84.38 86.27 88.57 90.20 90.49 94.05 96.78 97.23 94.95
[0070] To further improve classification accuracy, the optimal sigma value was selected for each dataset in this comparative example. This involved extracting Retinex features from the sigma value corresponding to the single-scale Retinex feature that yielded the highest relative classification accuracy, along with its two adjacent values. These Retinex features were then concatenated with the original spectral features and used as the final input to the SVM fused spatial-spectral features. To demonstrate the effectiveness of multi-scale features, Table 2 presents the classification results for the original spectral features, single-scale Retinex features, and multi-scale fused Retinex features. Table 2 shows that the classification accuracy of single-scale Retinex features is significantly higher than that of using only spectral features, fully demonstrating the effectiveness of the proposed method. Using multi-scale features can further improve classification accuracy.
[0071] Table 2
[0072]
[0073] When evaluating the classification results, this comparative example selects overall classification accuracy (OA), average classification accuracy (AA), and Kappa coefficient as evaluation metrics. The methods used in the classification result comparison include classic Extended Morphological Profile (EMP), Gabor texture features, feature extraction based on deep 3D autoencoders (3DCAE), feature extraction methods based on VGG19 pre-trained models, supervised convolutional neural network (CNN) methods, and fully convolutional network (FContNet) methods. The classification method proposed in this invention is denoted as MREtinex.
[0074] To ensure a fair comparison, all methods used the same training and testing samples. Except for supervised CNNs and FContNet, all other feature extraction methods used Support Vector Machines (SVMs) for classification, and the optimal parameters for the SVMs were determined using cross-validation. Figure 6 and Figure 7 Quantitative evaluation results obtained by different methods on two sets of hyperspectral images are presented, among which... Figure 6 This represents the quantitative evaluation results of different methods on the University of Pavia dataset. Figure 7 This represents the quantitative evaluation results of different methods on the Salinas dataset.
[0075] according to Figure 6 and Figure 7It can be observed that, overall, deep learning-based feature extraction and classification methods achieve higher classification accuracy than EMP and Gabor. The classification method proposed in this invention achieves the highest classification accuracy on both sets of hyperspectral images (two datasets), with a significant overall improvement in classification accuracy. For example, on the University of Pavia dataset, the classification accuracy of this method is more than 2% higher than VGG19, and on the Salians dataset, the classification accuracy is more than 4% higher than FContNet. This fully demonstrates the effectiveness of the proposed method. To facilitate observation of the effects of different classification methods, Figures 8a-8h , Figures 9a-9h The image shows the classification results obtained by different classification methods for the two datasets. Figure 8a These are the ground reality images corresponding to the University of Pavia dataset. Figure 8b The classification results obtained by using the EMP classification method on the University of Pavia dataset. Figure 8c The classification results obtained using the Gabor texture feature classification method for the University of Pavia dataset. Figure 8d The classification results obtained using the 3DCAE classification method for the University of Pavia dataset; Figure 8e The classification results obtained by using the VGG19 classification method for the University of Pavia dataset; Figure 8f The classification results obtained by using the CNN classification method on the University of Pavia dataset; Figure 8g The classification results obtained by using the FContNet classification method on the University of Pavia dataset; Figure 8h The classification results obtained by applying the MRetinex classification method proposed in this invention to the University of Pavia dataset; Figure 9a These are the ground reality images corresponding to the Salians dataset. Figure 9b The classification results obtained by applying the EMP classification method to the Salians dataset. Figure 9c The classification results obtained using the Gabor texture feature classification method for the Salians dataset. Figure 9d The classification results obtained by using the 3DCAE classification method on the Salians dataset. Figure 9e The classification results obtained by using the VGG19 classification method on the Salians dataset. Figure 9f The classification results obtained by using the CNN classification method on the Salians dataset. Figure 9gThe classification results obtained by using the FContNet classification method on the Salians dataset. Figure 9h The classification results obtained by applying the MRetinex classification method proposed in this invention to the Salians dataset.
[0076] according to Figures 8a-8h , Figures 9a-9h It can be observed that the classification noise of the method of the present invention is significantly less than that of other methods, which further verifies the effectiveness of the method of the present invention.
[0077] The hyperspectral image classification method of the present invention fuses Retinex features at different scales, which can take into account both the global and detailed features of hyperspectral images. Therefore, the fused features used for classification contain more image information, thereby improving classification accuracy.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A hyperspectral image classification method, characterized in that, The steps are as follows: 1) Obtain the original spectral features of the hyperspectral image to be classified, and extract Retinex features from the hyperspectral image by setting at least two different standard deviations of Gaussian functions in the Retinex algorithm to obtain Retinex features at at least two different scales; Retinex theory decomposes the hyperspectral image to be classified into a reflectance image and a brightness image. Retinex features are the features corresponding to the reflectance image used to represent essential information. 2) The obtained Retinex features at different scales are fused to form the multi-scale fusion features of the hyperspectral image to be classified; 3) The multi-scale fusion features of the hyperspectral image to be classified are fused with the original spectral features of the image to obtain the fused spatial-spectral features of the hyperspectral image; 4) Input the fused spatial-spectral features into the classifier to classify the hyperspectral images.
2. The hyperspectral image classification method according to claim 1, characterized in that, The standard deviation of the Gaussian function set in step 1) includes the optimal standard deviation of the Gaussian function. The optimal standard deviation of the Gaussian function refers to the Retinex feature extracted according to the standard deviation of the Gaussian function so that the classification accuracy of the classifier reaches the highest level.
3. The hyperspectral image classification method according to claim 2, characterized in that, In step 1), the standard deviation of the Gaussian function is set in three ways: the standard deviation of the optimal Gaussian function and two adjacent values of the standard deviation of the optimal Gaussian function.
4. The hyperspectral image classification method according to any one of claims 1-3, characterized in that, Support vector machines are used as classifiers.
5. The hyperspectral image classification method according to any one of claims 1-3, characterized in that, Both steps 2) and 3) employ a splicing method for feature fusion.