A hyperspectral image classification method and system
By extracting joint spatial and spectral features through adaptive subspace partitioning and multi-scale relative total variation techniques, and combining kernel principal component analysis and support vector machine models, the problems of insufficient feature extraction and high computational cost in hyperspectral image classification are solved, achieving higher classification accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XI'AN PETROLEUM UNIVERSITY
- Filing Date
- 2022-08-19
- Publication Date
- 2026-07-21
AI Technical Summary
Existing hyperspectral image classification methods fail to effectively perform spatial-spectral joint analysis during feature extraction, and are computationally intensive and time-consuming, resulting in low classification accuracy.
Adaptive subspace partitioning and multi-scale relative total variation techniques are used to extract joint spatial-spectral features, which are then combined with kernel principal component analysis and support vector machine models for classification.
It improves the classification accuracy of hyperspectral images, reduces computational redundancy, and enhances classification efficiency.
Smart Images

Figure CN115331105B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of hyperspectral image processing technology, and specifically relates to a hyperspectral image classification method and system. Background Technology
[0002] Hyperspectral remote sensing imagery is a cubic three-dimensional data set combining spectral and image data, characterized by "map-spectrum integration," and is widely used in fields such as vegetation classification, precision agriculture, environmental monitoring, and mineral mapping. In image analysis tasks, classification is a crucial research area within the application of hyperspectral technology. However, due to the high dimensionality, high nonlinearity, and "small sample size problem" of hyperspectral data, hyperspectral classification tasks still face significant challenges.
[0003] Early hyperspectral image classification typically only utilized the spectral features of ground features without delving into the internal contextual information of the image. Methods for extracting spectral features primarily include feature transformation and band selection. Commonly used feature transformation methods include principal component analysis (PCA), independent principal component analysis (IPA), and linear discriminant analysis (LDA). These methods are simple and fast, effectively preserving most of the information in the original high-dimensional data, but they can alter the original physical meaning of the bands during the mapping process. Feature selection-based spectral feature extraction selects a subset of the original bands with low similarity and high information content, using this subset to represent the original bands. This preserves more useful information without changing the original physical meaning. Commonly used measurement methods include: information entropy and joint entropy based on information content, the optimal exponent method, etc.; and information divergence (ID), Euclidean distance (ED), and cosine distance based on similarity. Classification using only the spectral information of hyperspectral images can easily lead to spatial discontinuities in ground features, producing a "salt and pepper" effect, resulting in classification results that are not ideal.
[0004] Later, researchers improved hyperspectral classification results by incorporating spatial information. Examples include Gray-Level Co-occurrence Matrix (GLCM), Local Binary Pattern (LBP), and Morphological Methods (MP). Furthermore, Gabor filtering, wavelet transform, and bilateral filters (BF) were also applied to hyperspectral image classification to extract texture features. In 2014, Pablo et al. proposed a spatial-spectral joint feature extraction method based on a combination of wavelet transform and MP. In 2015, Dalla et al. combined Independent Principal Component Analysis (ICA) and Extended Morphology to obtain spatial-spectral joint features. In 2018, Jia et al. proposed a 3-D Gabor surface feature fusion method, simultaneously obtaining spectral and spatial information, effectively improving classification accuracy. While these spatial-spectral joint feature extraction methods obtained the spatial-spectral features of hyperspectral images, they all suffered from low classification accuracy, poor spatial-spectral feature extraction performance, high computational cost, and long processing time.
[0005] Spatial-spectral joint features have become a trend in hyperspectral data feature extraction. While improving classification accuracy, they have also brought new opportunities and challenges to classification problems. Choosing a more effective method for spatial-spectral joint feature extraction has become a hot topic in classification research. Summary of the Invention
[0006] The purpose of this invention is to provide a hyperspectral image classification method and system to solve the problems of existing hyperspectral image feature extraction techniques that do not perform joint spatial and spectral feature extraction or have poor spatial and spectral feature extraction effects, large computational load, and long time consumption.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A hyperspectral image classification method includes the following steps:
[0009] The hyperspectral data is normalized, and the spectral dimension of the normalized hyperspectral image is divided into n subspaces.
[0010] The single-band image in each subspace is stretched into a one-dimensional vector, and a similarity matrix between bands in adjacent subspaces is constructed. Information divergence is used to measure the similarity between bands. The equally divided subspaces are adaptively divided into n subspaces according to the clustering method, so that each subspace contains a different number of bands.
[0011] Calculate the average value of the spectral dimension of each subspace, and then sum the spectral average values of each subspace as the output spectral feature;
[0012] Multi-scale spatial features are extracted from spectral feature output using a multi-scale relative total variational method.
[0013] Kernel principal component analysis was used to reduce the dimensionality of the extracted multi-scale spatial features, resulting in the final spatial-spectral joint features.
[0014] 5% of the Indian Pines data and 1% of the University of Pavia data were selected as the training set, and the remaining samples were used as the test set.
[0015] The test set is classified using a support vector machine model with an RBF kernel, and the classification accuracy is evaluated.
[0016] Furthermore, before normalizing the hyperspectral data, the original data is standardized so that the data is normalized to the range [0,1]. The calculation process is as follows:
[0017]
[0018] Assume that the hyperspectral data is L and the total number of bands is I; during the initial segmentation, the original cube data L is equally divided into n sub-cubes, and the calculation process is as follows:
[0019]
[0020] L → {l1, l2, …, l n} (3)
[0021] At this time, l i (i ≤ n) is the divided subspace, and each subspace contains the same number of bands Z.
[0022] Furthermore, construct the similarity matrix between bands in adjacent subspaces, specifically:
[0023] For the similarity between bands in two adjacent subspaces l i and l i+1 (i + 1 ≤ n), after stretching the bands into one-dimensional vectors, construct the similarity matrix. The similarity is measured using information divergence, and the division point between these two adjacent subspaces is re-divided in a clustering manner;
[0024] Information divergence: Assume that there are N bands in total for the data. Randomly select two bands X and Y, which are represented as one-dimensional vectors as X = (x1, x2, …, x N ) and Y = (y1, y2, …, y N ). The information divergence d ID (X, Y) between these two bands is defined by formulas (4)-(6);
[0025] d ID (X, Y) = D(X‖Y) + D(Y‖X) (4)
[0026]
[0027]
[0028] Among them, and respectively represent the probabilities of x i and y i (i < N). D(Y‖X) and D(X‖Y) are respectively the information divergence measurements of Y relative to X and X relative to Y; when the divergence value is larger, it indicates that the similarity between the two bands is lower. If the two bands are exactly the same, the information divergence value is 0;
[0029] Subspace clustering is to maximize the inter-class distance and minimize the intra-class distance. The general form of the division objective function is expressed as follows:
[0030] argmin(d intra -dinter ) (7)
[0031] where d inter is the inter-class distance between two adjacent subspaces, represented by the maximum information divergence value in the two subspaces, and is defined as follows:
[0032] d inter = max|d ID (m,n)| (8)
[0033] d ID (m,n) represents the information divergence value between band m and band n. Assuming that m is a band in the i-th (i≤n) subspace, then n is a band in the (i + 1)-th subspace;
[0034] d intra is the intra-class distance, represented by the sum of the average information divergences of two adjacent subspaces, and is defined as follows:
[0035] d intra = M i + M i+1 (9)
[0036]
[0037]
[0038] d ID (p,q) is the information divergence value between the p-th and q-th bands. The p-th and q-th bands belong to the same subspace; assuming M i is the average of the sum of the information divergences of the i-th sub-cube, then M i+1 is the average of the sum of the information divergences of the (i + 1)-th sub-cube, and t is the total number of frequency bands contained in the i-th sub-cube; the subspaces after re-partitioning by the objective function (7) can be represented as:
[0039] B = {b1,b2,b3…,b n} (12)
[0040] where B represents the output of the clustering algorithm, and b i (i < n) represents the new subspace after the clustering algorithm.
[0041] Furthermore, calculate the spectral average value of each subspace, and use this average value to represent this subspace as the output, as shown in Equation (13):
[0042]
[0043] is for the subspace b i(i < n) The result of calculating the spectral average value, outputting the average spectral values of n subspaces and superimposing them to obtain spectral features with a band number of n; Avg b is the average spectral value of each sub-cube The result after superposition.
[0044] Furthermore, the RTV technology is used to extract the spatial features of the image. The definition of RTV is as follows:
[0045]
[0046] λ is the weight, i.e., the penalty parameter, used to control the image smoothness; the RTV at pixel p is defined as in Equation (15);
[0047]
[0048] where ε is a non-zero constant, aiming to avoid the denominator in Equation (15) being zero, D x and D y are the window total variations in the x and y directions respectively, L x and L y are the window intrinsic variations in the x and y directions respectively. D depends on the absolute magnitude of the pixel gradient values in the neighborhood, while L depends not only on the absolute magnitude of the gradient values but also on the gradient direction, and is defined as in Equations (16)-(19);
[0049]
[0050]
[0051]
[0052]
[0053] where q is the pixel in the rectangular neighborhood of pixel p, and represent the partial derivatives of the image S in the x and y directions respectively; g p,q is the Gaussian weight of the distance between the two, and the calculation method is as in Equation (20);
[0054]
[0055] where σ is the Gaussian standard deviation, controlling the scale size of the neighborhood; x p -x q represents the distance difference between the two in the x direction, y p -y q represents the distance difference in the y direction.
[0056] Based on RTV, different parameters are set to extract structural features from the same data multiple times. The resulting feature subsets are stacked according to the spectral dimension, which can meet the needs of structural feature extraction of different substances and form an MRTV spatial feature extraction framework, as shown in equations (21) and (22).
[0057] f i =RTV(I,λ) i , σ i (i≤c) (21)
[0058] F = {f1, f2, f3…f c} (twenty two)
[0059] Where I represents the original data, and assuming that I has m bands, performing RTV calculations on I with c different parameter settings yields c feature subsets {f1, f2, f3…f…} with m bands. c};λ i This controls the smoothness of the image; the higher the value, the blurrier the image, and vice versa. σ i To control the neighborhood size; f i Let be the i-th feature subset with m bands; F represents the cube data of c feature subsets stacked according to spectral dimensions, with m × C bands.
[0060] Furthermore, the multi-scale structural features are subjected to KPCA dimensionality reduction processing. The definition of KPCA is as follows:
[0061] Assume the original data space is R D The original data is S = {x1, x2, ..., x}. M}∈R D There are a total of M samples. Given the mapping function from low-dimensional space to high-dimensional space, and the mean of the mapped data being 0, we obtain formula (23);
[0062]
[0063] Thus, the covariance matrix C of the mapped data is obtained as shown in formula (24);
[0064]
[0065] If the eigenvector matrix of matrix C is V and the eigenvalue is λ, then formula (25) can be obtained;
[0066] λV=CV (25)
[0067] Let x i and x j For any two sample points, define a matrix K of size M×M. ij, as in formula (26);
[0068]
[0069] For the k-th eigenvector V of the eigenvector matrix V k After normalization, we get (27);
[0070] V k V k =1 (27)
[0071] Then the mapping function for any sample x in the original space is obtained. In V k The projection of is (28);
[0072]
[0073] The coefficients are linearly expressed; the data is digitized using the mapping. To replace K as in formula (29);
[0074]
[0075] Among them I M If it is an M×M matrix, then the k-th dimension of the sample data is represented by formula (30);
[0076]
[0077] KPCA uses the RBF kernel function to map nonlinear inseparable data, as shown in Equation (31), where N is the number of bands after feature fusion and P is the final feature output.
[0078] P = KPCA(F,N) (31).
[0079] Furthermore, training samples are randomly selected according to a predetermined training sample ratio. Assuming there are N training samples, each with dimension d, the training sample set can be represented as follows: The test set has M samples, represented as follows: Divide the dataset into a training set and a test set, with a total number of samples of (M+N).
[0080] Furthermore, SVM was used to classify the two hyperspectral datasets, and the penalty parameter C and kernel parameter σ of the SVM were set to 24.5.
[0081] Furthermore, the classification performance evaluation indicators include overall classification accuracy, average classification accuracy, and Kappa coefficient.
[0082] Furthermore, a hyperspectral image classification system includes:
[0083] The preprocessing module is used to normalize the hyperspectral data, dividing the spectral dimension of the normalized hyperspectral image into n subspaces.
[0084] The matrix construction module is used to stretch the single-band image in each subspace into a one-dimensional vector, construct the similarity matrix between bands in adjacent subspaces, use information divergence to measure the similarity between bands, and adaptively divide the evenly divided subspaces into n subspaces according to the clustering method, so that each subspace contains a different number of bands.
[0085] The feature output module is used to calculate the average value of the spectral dimension of each subspace, and the spectral average values of each subspace are superimposed to obtain the spectral feature output.
[0086] The feature extraction module is used to extract multi-scale spatial features from the spectral feature output using the multi-scale relative total variation method;
[0087] The dimensionality reduction module is used to perform dimensionality reduction on the extracted multi-scale spatial features using kernel principal component analysis to obtain the final spatial-spectral joint features.
[0088] The test set classification module selects 5% of the Indian Pines data and 1% of the University of Pavia data as the training set, and uses the remaining samples as the test set. It uses a support vector machine model with RBF kernel to classify the test set and evaluates the classification accuracy of the results.
[0089] Compared with the prior art, the present invention has the following technical effects:
[0090] Based on the characteristic that hyperspectral data has both spectral and spatial dimensions, this paper extracts its spatial-spectral joint features. (1) Information divergence is used to measure the similarity between bands and subspaces are divided based on the idea of clustering. Finally, the spectral average values of the subspaces are superimposed as the spectral features output. (2) Relative total variation technique with different parameter settings is used to extract multi-scale spatial features. (3) Kernel principal component analysis is used to reduce the dimensionality of the data to obtain the final spatial-spectral joint features. (4) An SVM model with RBF kernel is used to classify the spatial-spectral joint features, and the algorithm is demonstrated to improve the classification accuracy on two hyperspectral datasets.
[0091] To reduce information redundancy, this invention utilizes information divergence values to determine the similarity between bands and employs clustering to divide the space into adaptive subspaces for spectral feature extraction. Since texture details may contain noise, this invention proposes extracting structural features from the image as spatial features. It utilizes relative total variation techniques under different parameter settings to extract multi-scale spatial features and performs dimensionality reduction using kernel principal component analysis, ultimately obtaining joint spatial and spectral features. Compared with commonly used feature extraction methods, this model achieves better accuracy. Attached Figure Description
[0092] Figure 1 This is a flowchart of hyperspectral feature extraction based on joint spatial and spectral features.
[0093] Figure 2 This is a diagram of the spectral feature extraction structure based on adaptive subspace partitioning.
[0094] Figure 3 It is a spatial feature extraction structure diagram based on multi-scale relative total variation.
[0095] Figure 4 It is an image of Indian Pines.
[0096] Figure 5 It is footage from the University of Pavia.
[0097] Figure 6 These are classification maps of Indian Pines data using different feature extraction methods, where (a) ground truth map, (b) SVM, (c) ASPS (ED), (d) ASPS (ID), (e) ASPS-LBP, (f) ASPS-GlCM, (g) ASPS-BF, and (h) ASPS-MRTV.
[0098] Figure 7 These are classification maps of the University of Pavia data using different feature extraction methods, where (a) ground truth map, (b) SVM, (c) ASPS (ED), (d) ASPS (ID), (e) ASPS-LBP, (f) ASPS-GlCM, (g) ASPS-BF, and (h) ASPS-MRTV. Detailed Implementation
[0099] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings and examples.
[0100] This invention presents a hyperspectral image classification method based on band clustering and multi-scale structural feature fusion. First, the hyperspectral image is normalized. Considering the simultaneous spectral and spatial dimensions of hyperspectral data, a joint spatial-spectral feature extraction method is proposed. The information divergence values between bands are calculated, and an adaptive subspace partitioning is formed using clustering. The average value of each sub-cube is used to replace the cube, thus extracting spectral features. For spatial information, multi-scale structural spatial features are extracted by calculating relative total variation at different scales. Kernel principal component analysis is used for dimensionality reduction, ultimately forming the joint spatial-spectral features. To verify the effectiveness of the feature extraction framework, an SVM model with an RBF kernel is used to classify the joint spatial-spectral features, and the algorithm is demonstrated to improve classification accuracy on two hyperspectral datasets.
[0101] like Figure 1 As shown, the present invention specifically includes the following steps:
[0102] First, the hyperspectral remote sensing image data was normalized. For spectral information extraction, a spectral feature extraction structure based on the Adaptive Subspace Partitioning Strategy (ASPS) was constructed. For example... Figure 2 As shown in the diagram. Specifically, the hyperspectral data is first divided into n subspaces according to spectral dimension. Then, the information divergence between adjacent subspaces is calculated, and the subspaces are re-divided using a clustering method to obtain adaptively partitioned subspaces. Finally, the average values of the n subspaces are calculated and superimposed to form spectral features. For spatial information extraction, a spatial feature extraction structure based on Multi-scale Relative Total Variation (MRTV) is constructed. (See diagram for details.) Figure 3 As shown, by calculating the relative total variation at different scales, the multi-scale structural spatial features of the data are extracted, and then KPCA dimensionality reduction is performed on them to finally form the joint spatial-spectral features.
[0103] A more specific embodiment of the present invention is as follows:
[0104] 1. Hardware Platform
[0105] This spatial-spectral joint feature extraction experiment was conducted in a Windows 10 and Matlab 2019a environment, with an Intel Core i7-8750 processor, an NVIDIA GeForce GTX 1050 Ti GPU, and 16GB of memory.
[0106] 2. Experimental Data
[0107] 2.1 Indian Pines Dataset
[0108] The Indian Pines (IP) data is based on real-world scenes from an experimental area in northwestern Indiana, acquired by the AVIRIS airborne visible light imaging spectrometer. The data is 145×145×220 pixels in size, with a spatial resolution of 20m and a spectral range of 0.2μm–2.4μm. After removing 20 spectral bands covering water absorption areas to mitigate experimental effects, a total of 200 bands are included. The image contains 16 real land features, and includes a false color map, a ground truth map, and land feature types as shown below. Figure 4 As shown in Table 1, the actual distribution of ground features is as follows.
[0109] Table 1. Land cover categories and sample division of IP dataset
[0110]
[0111]
[0112] 2.2 University of Pavia Dataset
[0113] The University of Pavia data (UP) was acquired by the ROSIS-3 imaging spectrometer from images of a portion of the University of Pavia in Italy. The image has a spatial resolution of 1.3 m and a wavelength range of 0.43–0.86 μm. The image size is 610 × 340 × 115. After removing 12 spectral bands covering water absorption areas to mitigate experimental effects, a total of 103 bands were retained, encompassing 9 land cover types. The pseudo-color map, ground truth map, and land cover types are shown below. Figure 5 As shown in Table 2, the actual distribution of ground features is as follows.
[0114] Table 2. Land cover categories and sample division in the UP dataset.
[0115]
[0116]
[0117] 3. Evaluation Indicators
[0118] (1) Confusion Matrix
[0119] The confusion matrix is an n*n square matrix, where n represents the number of classes, and is generally defined in the following form:
[0120]
[0121] In the formula m ij This represents the number of samples from class i that were misclassified into class j.
[0122] (2) Overall accuracy (OA)
[0123] Assuming the image category is C, the calculation formula is as follows:
[0124]
[0125] Where N represents the total number of test samples, M ii This represents the value in the i-th row and i-th column of the confusion matrix. OA represents the probability that the classification result matches the reference classification result. The larger the OA, the better the classification performance.
[0126] (3) Average classification accuracy (AA)
[0127] Average classification precision (AA) represents the average percentage of each category that is correctly classified. A higher AA indicates better classification performance. The formula for calculating AA is as follows:
[0128]
[0129] (4) Kappa coefficient
[0130] The Kappa coefficient measures the uncertainty of classification results and is calculated based on the confusion matrix M. A larger Kappa coefficient indicates better classification performance. The formula is as follows:
[0131]
[0132] 4. Experimental Results and Evaluation
[0133] 4.1 Experimental Setup
[0134] During the experiment, we randomly selected 5% and 1% of the data from the IP and UP datasets, respectively, as training samples, and the remaining samples as test samples. To verify the effectiveness of the feature extraction framework, we uniformly used an SVM with an RBF kernel for classification in the comparative experiments, and set the SVM penalty parameter C and kernel parameter σ to 24.5. The classification performance evaluation metrics used were OA, AA, and Kappa coefficients. Table 3 shows the parameters involved in this experiment and their meanings.
[0135] Table 3. Parameters and their meanings
[0136]
[0137] 4.2 Parameter Optimization
[0138] In the spatial feature extraction process, λ and σ are two key parameters that determine the RTV effect. The value of λ is usually between [0, 0.05], while the value of σ is usually between [1, 3] and is an integer. In order to extract structural features of more types of materials, this paper selects λ at five scales: λ1 = 0.003, λ2 = 0.015, λ3 = 0.01, λ4 = 0.02, and λ5 = 0.05, so that they can include as many large and small scales as possible. The optimization process of σ uses the controlled variable method, fixing the other σ values to obtain σ1 with the best classification performance. The other σ values are optimized in the same way. Initially, K = N = 30 is uniformly set, and σ1-σ5 are simply set to 1. The results of the σ experiment on IP data are shown in Table 4, with the optimal accuracy shown in bold.
[0139] Table 4 shows the optimization process of σ on IP.
[0140] <![CDATA[σ2]]> 1 1 1 2 3 1 1 1 1 1 1 <![CDATA[σ3]]> 1 1 1 1 1 2 3 1 1 1 1 <![CDATA[σ4]]> 1 1 1 1 1 1 1 2 3 2 2 <![CDATA[σ5]]> 1 1 1 1 1 1 1 1 1 2 3 OA (%) 96.59 96.50 96.53 96.33 96.36 96.49 96.46 96.67 96.08 96.73 96.76 Kappa (%) 96.09 95.98 96.02 95.78 95.82 95.97 95.94 96.19 95.50 96.25 96.28 AA (%) 84.99 84.63 85.61 84.17 83.91 84.18 84.03 85.11 83.82 85.29 85.66
[0141] After determining λ and σ, parameter K was optimized. The initial value of K was set to 30. Since there are 200 bands in the IP data, the experimental range of K for the IP data was set to [10, 100]. The results are shown in Table 5, with the optimal results shown in bold.
[0142] Table 5. The Influence of Parameter K on IP Classification Accuracy
[0143] oA(%) 95.41 96.00 96.76 96.52 95.59 96.00 95.08 95.23 94.72 93.98 Kappa (%) 94.89 95.07 96.28 95.93 94.93 95.40 94.35 94.51 93.93 93.22 AA (%) 83.33 84.31 85.16 84.01 83.34 83.61 82.55 82.58 81.73 81.11 Time(s) 127.3 129.5 130.9 132.4 134.3 135.4 135.9 137.0 137.7 139.8
[0144] The experimental range of N in the IP data is [10, 100]. The experimental results of N on the IP data are shown in Table 6, with the best results shown in bold.
[0145] Table 6. The Influence of Parameter N on IP Classification Accuracy
[0146] OA (%) 96.98 97.06 96.76 96.01 95.26 93.8 93.23 92.02 91.42 89.98 Kappa (%) 96.55 96.64 96.28 95.41 94.32 92.86 92.16 90.75 90.05 87.9 AA (%) 88.05 85.95 85.16 83.8 82.38 80.68 79.38 76.89 75.75 73.23 Time(s) 132.1 132.4 134.4 133.9 134.7 136.1 135.9 137.1 137.8 138.7
[0147] Table 4 shows that for IP data, the classification accuracy is highest when σ1=1, σ2=1, σ3=1, σ4=2, and σ5=3, with OA reaching 96.76%, Kappa reaching 96.28%, and AA reaching 85.66%. Table 5 shows that the classification accuracy initially increases and then decreases as K increases. This indicates that when K is relatively small, the extracted effective information increases with increasing K, leading to higher accuracy. However, when K is too large, information redundancy occurs, resulting in decreased classification accuracy. The classification accuracy also increases with increasing K. The best classification accuracy is achieved when K=30, with OA reaching 96.76%, Kappa reaching 96.28%, and AA reaching 85.16%. As shown in Table 6, the classification accuracy initially increases and then decreases with the increase of N. When N is set to 20, the highest accuracy for OA is 97.06%, and for Kappa it is 96.64%. However, when N = 10, the highest accuracy for AA is 88.02%. In this experiment, the performance of OA was used as the benchmark. In summary, for IP data, this paper sets λ1 = 0.003, λ2 = 0.015, λ3 = 0.01, λ4 = 0.02, λ5 = 0.05, σ1 = 1, σ2 = 1, σ3 = 1, σ4 = 2, σ5 = 3, K = 30, and N = 20.
[0148] The results of the experiment on σ using UP data are shown in Table 7. UP data has 103 bands, so the experimental range for K is [10, 60], and the results are shown in Table 8. The experimental range for N using UP data is [10, 60], and the results are shown in Table 9, with the optimal results highlighted in bold.
[0149] Table 7. Optimization process of parameter σ on UP in RTV.
[0150] <![CDATA[σ2]]> 1 1 1 2 3 1 1 1 1 1 1 <![CDATA[σ3]]> 1 1 1 1 1 2 3 2 2 2 2 <![CDATA[σ4]]> 1 1 1 1 1 1 1 2 3 2 2 <![CDATA[σ5]]> 1 1 1 1 1 1 1 1 1 2 3 OA (%) 98.76 98.86 98.77 98.83 98.76 98.86 98.77 98.90 98.89 98.87 98.85 Kappa (%) 98.35 98.48 98.36 98.45 98.34 98.49 98.36 98.54 98.53 98.51 95.48 AA (%) 88.38 88.44 88.18 88.34 88.36 88.50 88.31 88.61 88.51 88.46 88.37
[0151] Table 8. The Influence of Parameter K on UP Classification Accuracy
[0152] OA (%) 98.84 98.85 98.82 98.71 98.20 97.90 Kappa (%) 98.36 98.51 98.46 98.48 97.67 97.59 AA (%) 88.42 88.55 88.53 88.27 87.77 87.71 Time(s) 130.3 139.5 157.3 179.4 204.7 221.0
[0153] Table 9. Influence of parameter N on UP classification accuracy
[0154] OA (%) 98.37 98.70 98.83 98.91 98.98 98.43 Kappa (%) 97.83 98.34 98.61 98.58 98.62 98.27 AA (%) 87.63 88.40 88.65 88.57 88.76 88.35 Time(s) 137.3 139.5 144.3 144.4 145.7 145.9
[0155] As shown in Table 7, for the UP data, the classification accuracy is highest when σ1 = 2, σ2 = 1, σ3 = 2, σ4 = 2, and σ5 = 1, with OA reaching 98.90%, Kappa reaching 98.54%, and AA reaching 88.61%. Furthermore, the influence of two important parameters, K and N, on classification accuracy is discussed. Table 8 shows that OA, AA, and Kappa generally increase and then decrease with increasing K. The classification effect is best when K = 20, at which point OA reaches 98.85%, Kappa = 98.51%, and AA = 88.55%. Table 9 shows that the classification performance also shows an initial increase followed by a decrease with increasing N. When N = 50, OA = 98.98%, Kappa = 98.62%, and AA = 88.76%. To achieve higher classification accuracy, for the UP dataset, this paper sets λ1 = 0.003, λ2 = 0.015, λ3 = 0.01, λ4 = 0.02, λ5 = 0.05, σ1 = 2, σ2 = 1, σ3 = 2, σ4 = 2, σ5 = 1, K = 20, and N = 50.
[0156] 4.3 Comparison of Results
[0157] In this section, we will compare different feature extraction strategies with our proposed feature extraction method. The classifier will uniformly use an SVM with an RBF kernel, and C = σ = 24.5. Six comparison methods will be used:
[0158] SVM: Use an SVM with an RBF kernel to directly classify the data;
[0159] ASPS(ED): The proposed Adaptive Subspace Partitioning Strategy (ASPS) is used to obtain spectral features. The similarity between bands is measured using Euclidean distance, and spatial information is no longer extracted.
[0160] ASPS(ID): Spectral features are obtained using the proposed adaptive subspace partitioning strategy. The similarity measurement between bands uses information divergence spectral features, and spatial information is no longer extracted.
[0161] ASPS-LBP: The proposed adaptive subspace partitioning strategy is used to obtain spectral features, and then LBP is used to extract joint spatial and spectral features. B=10 and R=1 are set.
[0162] ASPS-GICM: Spectral features are obtained using the proposed adaptive subspace partitioning strategy, and then GLCM is used to extract joint spatial and spectral features, selecting 4 different directions (0°, 45°, 90°, 135°).
[0163] ASPS-BF: Spectral features are obtained using the proposed adaptive subspace partitioning strategy, and then joint spatial-spectral features are extracted from the image using a bilateral filter (BF); the filter radius w and spatial standard deviation δ... α δ of gray scale r Set w = 15, δ respectively α =8,δ r =3.
[0164] ASPS-MRTV(AM): Spatial-spectral joint features are obtained using our proposed feature extraction framework.
[0165] First, experiments were conducted on IP data using the seven methods described above, and the results are shown in Table 10.
[0166] Table 10. Impact of different feature extraction methods on IP classification performance
[0167]
[0168] Table 10, in bold, indicates the optimal classification accuracy. This table shows that the proposed ASPS-MRTV algorithm achieves the best classification performance, with OA reaching 97.06%, Kappa reaching 96.64%, and AA reaching 85.95%. Compared to other algorithms, it improves accuracy by at least 5.24% for OA, at least 7.42% for Kappa, and at least 6.96% for AA. In the IP data classification results, ASPS(ED)'s accuracy is lower than SVM, indicating that while ED is a common method for calculating band similarity using distance, it is not suitable for high-dimensional data. ASPS(ID) improves classification accuracy by 28.44% compared to ASPS(ED), demonstrating that information divergence, as a band similarity criterion, can retain more useful information while reducing redundancy. ASPS(ID) improves classification accuracy by 9.8% compared to SVM, indicating that the proposed spectral feature extraction framework can increase the class separability of IP data. ASPS-BF and ASPS-MRTV show significant improvements in accuracy compared to ASPS-GlCM and ASPS-LBP. This indicates that structural features are more effective for classifying IP data than texture features, because image textures contain varying degrees of noise, and traditional texture feature extraction methods cannot effectively remove this noise, resulting in low classification accuracy. Furthermore, the higher classification accuracy of ASPS-MRTV compared to ASPS-BF demonstrates that the proposed spatial feature extraction framework MRTV can take into account the spatial structural information of various land features, effectively improving the classification accuracy of SVM on IP data. Figure 6 The demonstration of classification results under different methods shows that ASPS-MRTV has the fewest classification errors and is closest to the real ground map.
[0169] The above seven methods were used to conduct experiments on the UP data, and the results are shown in Table 11.
[0170] Table 11 Impact of different feature extraction methods on UP classification performance
[0171]
[0172] The bolded values in the table represent the optimal classification accuracy. The results show that the ASPS-MRTV feature extraction framework performs best, achieving OA 98.98%, Kappa 98.62%, and AA 88.76%. Traditional SVM performs the worst, highlighting the necessity of joint spatial-spectral feature extraction for hyperspectral image classification. ASPS(ID) has higher classification accuracy than ASPS(ED), further demonstrating the effectiveness of information divergence as a criterion for evaluating the similarity between IP data bands. ASPS-LBP, ASPS-GlCM, ASPS-BF, and ASPS-MRTV all have higher classification accuracy than ASPS(ID) and ASPS(ED), indicating that adding spatial features to spectral feature extraction is more beneficial for hyperspectral image classification. ASPS-BF and ASPS-MRTV have higher classification accuracy than ASPS-GlCM and ASPS-LBP, which use texture features, further demonstrating that extracting structural features is more effective for hyperspectral data classification. The classification results for UP data are shown below. Figure 7 As shown in the figure, (b), (c), and (d) did not undergo spatial feature extraction and have more classification errors. In contrast, ASPS-BF and the proposed spatial-spectral joint feature model ASPS-MRTV have the fewest classification errors. This further demonstrates that structural features are robust to noise and can effectively improve classification accuracy.
Claims
1. A hyperspectral image classification method, characterized in that, Includes the following steps: The hyperspectral data is normalized, and the spectral dimension of the normalized hyperspectral image is divided into Q subspaces. The single-band image in each subspace is stretched into a one-dimensional vector, and a similarity matrix between bands in adjacent subspaces is constructed. Information divergence is used to measure the similarity between bands. The equally divided adaptive subspace is adaptively divided into W adaptive subspaces according to the clustering method, so that each adaptive subspace contains a different number of bands. Calculate the average value of the spectral dimension of each adaptive subspace, and then sum the spectral average values of each adaptive subspace as the spectral feature output. Multi-scale spatial features are extracted from spectral feature output using a multi-scale relative total variational method. Kernel principal component analysis was used to reduce the dimensionality of the extracted multi-scale spatial features, resulting in the final spatial-spectral joint features. We selected 5% of the Indian Pines data and 1% of the University of Pavia data as the training set, and used the remaining samples as the test set. The test set was classified using a support vector machine model with an RBF kernel, and the classification accuracy was evaluated. Construct the similarity matrix between bands in adjacent subspaces, specifically as follows: Consider two adjacent subspaces and The similarity between the bands is determined by stretching the bands into one-dimensional vectors to construct a similarity matrix. The similarity is measured using information divergence, and the dividing points of these two adjacent subspaces are re-divided according to clustering. Information divergence: Assuming the data has a total of I bands, two bands are randomly selected. and Represented by a one-dimensional vector as and Information divergence between these two bands Defined as formulas (4)-(6); (4) (5) (6) in, and They represent and probability, and They are Compared to and Compared to Information divergence measurement; the larger the divergence value, the lower the similarity between the two bands; if the two bands are completely identical, their information divergence value is 0. Subspace clustering aims to maximize inter-class distances and minimize intra-class distances. The general form of the objective function is as follows: (7) in It is the inter-class distance between two adjacent subspaces, represented by the maximum information divergence value between the two subspaces, and is defined as follows: (8) Indicates band m and band n The information divergence value between them, assuming m It is the first The bands in the middle, n It is the first i+1 Wavebands in a subspace; It is the intra-class distance, represented by the sum of the average information divergences of two adjacent subspaces, and is defined as follows: (9) (10) (11) For the first i Subspace and the first i+1 The sum of the total number of frequency bands contained in each subspace; For the first p and the q The information divergence value between the bands, the i-th p and the q Each band belongs to the same subspace; assuming For the first i The average of the sum of the information divergences of each subspace, then For the first i+1 The average value of the sum of information divergences in each subspace. For the first i The total number of frequency bands contained in each subspace; the adaptive subspace after being further divided by the objective function (7) is represented as: (12) in This represents the output of the clustering algorithm. This represents the new adaptive subspace after the clustering algorithm.
2. The hyperspectral image classification method according to claim 1, characterized in that, Before normalizing the hyperspectral data, the original data is standardized so that the data is normalized to the range [0,1]. The calculation process is as follows: (13) Assuming the hyperspectral data is L, and the total number of bands is I; during the initial segmentation, the original cubic data L is divided into Q equal subspaces, and the calculation process is as follows: (14) (15) at this time, The resulting subspaces contain the same number of bands. .
3. The hyperspectral image classification method according to claim 1, characterized in that, The spectral average value of each adaptive subspace is calculated, and this average value is used to represent the subspace as the output, as shown in equation (16): (16) Pair space Calculate the spectral average value and output it. The average spectral values of each subspace are superimposed to obtain a spectral feature with W bands; It is the average value of the spectrum in each subspace. The result after superposition.
4. The hyperspectral image classification method according to claim 1, characterized in that, Using RTV technology to extract spatial features from images, RTV is defined as follows: (17) The penalty parameter controls image smoothness; pixels. The RTV at the location is defined as in equation (15); (18) in, It is a non-zero constant, the purpose of which is to avoid the denominator being zero in formula (18). and Let be the total variation of the windows in the x and y directions, respectively. and Let be the intrinsic variations of the window in the x and y directions, respectively. It depends on the absolute magnitude of the pixel gradient value in the neighborhood, and It depends not only on the absolute magnitude of the gradient value, but also on the direction of the gradient, as defined in equations (19)-(22); (19) (20) (21) (22) in, It is a pixel Pixels within a rectangular neighborhood and Representing images respectively Partial derivatives in the x and y directions; It is the Gaussian weight of the distance between the two, calculated as in formula (20); (23) in, It is the Gaussian standard deviation, which controls the scale of the neighborhood; This represents the difference in distance between the two along the x-direction. This represents the distance difference in the y-direction; Based on RTV, different parameters are set to extract structural features from the same data multiple times. The resulting feature subsets are stacked according to the spectral dimension, which can meet the needs of structural feature extraction of different substances and form an MRTV spatial feature extraction framework, as shown in equations (24) and (25). (24) (25) Here, T represents the spectral feature data. Assuming that T has h bands, performing RTV calculations on T with c different parameter settings yields c feature subsets with h bands. ; Controls the smoothness of the image; the higher the value, the blurrier the image, and vice versa. To control the size of the neighborhood; For the first A feature subset, with h bands; This represents a cube of c feature subsets stacked along the spectral dimension, with h bands. c.
5. The hyperspectral image classification method according to claim 1, characterized in that, KPCA dimensionality reduction is performed on the multi-scale structural features. The definition of KPCA is as follows: Assume the original data space is The original data is There are a total of M samples. Given a mapping function from low-dimensional space to high-dimensional space, and the mean of the mapped data is 0, we get formula (26). (26) This yields the covariance matrix of the mapped data. Formula (27) is used; (27) If matrix The eigenvector matrix is eigenvalues Then we can obtain formula (28); (28) set up and For any two sample points, define the size as matrix , as in formula (29); (29) For the eigenvector matrix The kth eigenvector After normalization, we get (30); (30) This yields any sample in the original space. mapping function exist The projection is (31); (31) The coefficients are linearly expressed; the data is digitized using the mapping. to replace As in formula (32); (32) in It is The matrix; then the k-th dimension of the sample data is represented by formula (33); (33) KPCA uses the RBF kernel function to map nonlinear inseparable data, as shown in Equation (34), where U is the number of bands after feature fusion and P is the final feature output. (34)。 6. The hyperspectral image classification method according to claim 1, characterized in that, Training samples are randomly selected according to a predetermined training sample ratio. Let there be K training samples, each with dimension d. Then the training sample set can be represented as follows: The test set has J samples, represented as: Divide the dataset into training and test sets, with a total number of samples of (K+J).
7. The hyperspectral image classification method according to claim 1, characterized in that, SVM was used to classify two hyperspectral datasets, and the penalty parameter C and kernel parameter of the SVM were calculated. Set them all to 24.
5.
8. A hyperspectral image classification method according to claim 1, characterized in that, The classification performance evaluation indicators include overall classification accuracy, average classification accuracy, and Kappa coefficient.
9. A hyperspectral image classification system, characterized in that, include: The preprocessing module is used to normalize the hyperspectral data, dividing the spectral dimension of the normalized hyperspectral image into Q subspaces. The matrix construction module is used to stretch the single-band image in each subspace into a one-dimensional vector, construct the similarity matrix between bands in adjacent subspaces, use information divergence to measure the similarity between bands, and adaptively divide the equally divided subspaces into W subspaces according to the clustering method, so that each subspace contains a different number of bands. The feature output module is used to calculate the average value of the spectral dimension of each subspace, and the spectral average values of each subspace are superimposed to obtain the spectral feature output. The feature extraction module is used to extract multi-scale spatial features from the spectral feature output using the multi-scale relative total variation method; The dimensionality reduction module is used to perform dimensionality reduction on the extracted multi-scale spatial features using kernel principal component analysis to obtain the final spatial-spectral joint features. The test set classification module selects 5% of the Indian Pines data and 1% of the University of Pavia data as the training set, and uses the remaining samples as the test set; it uses a support vector machine model with RBF kernel to classify the test set and evaluates the classification accuracy of the classification results. Construct the similarity matrix between bands in adjacent subspaces, specifically as follows: two adjacent subspaces and The similarity between the bands is determined by stretching the bands into one-dimensional vectors to construct a similarity matrix. The similarity is measured using information divergence, and the dividing points of these two adjacent subspaces are re-divided according to clustering. Information divergence: Assuming the data has a total of I bands, two bands are randomly selected. and Represented by a one-dimensional vector as and Information divergence between these two bands Defined as formulas (4)-(6); (4) (5) (6) in, and They represent and probability, and They are Compared to and Compared to Information divergence measurement; the larger the divergence value, the lower the similarity between the two bands; if the two bands are completely identical, their information divergence value is 0. Subspace clustering aims to maximize inter-class distances and minimize intra-class distances. The general form of the objective function is as follows: (7) in It is the inter-class distance between two adjacent subspaces, represented by the maximum information divergence value between the two subspaces, and is defined as follows: (8) Indicates band m and band n The information divergence value between them, assuming m It is the first The bands in the middle, n It is the first i+1 Wavebands in a subspace; It is the intra-class distance, represented by the sum of the average information divergences of two adjacent subspaces, and is defined as follows: (9) (10) (11) For the first p and the q The information divergence value between the bands, the i-th p and the q Each band belongs to the same subspace; assuming For the first i The average of the sum of the information divergences of each subspace, then For the first i+1 The average value of the sum of information divergences in each subspace. For the first i The total number of frequency bands contained in each subspace; the adaptive subspace after being further divided by the objective function (7) is represented as: (12) in This represents the output of the clustering algorithm. This represents the new adaptive subspace after the clustering algorithm.