Hyperspectral image space-spectrum joint classification method and system using particle swarm optimization multi-kernel support vector machine
By using the Particle Swarm Optimized Multi-Kernel Support Vector Machine (PSO-MSVM) method, the weight allocation problem in the multi-feature fusion of hyperspectral remote sensing images was solved, enabling accurate classification of hyperspectral remote sensing images and improving the ability to identify land cover categories.
Patent Information
- Application Number
- CN202210253842.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-15
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-03-15
AI Technical Summary
Existing hyperspectral remote sensing image classification methods are weak when multiple features are fused. Traditional methods such as exhaustive search and gradient descent are prone to unsolvable problems, ignoring the advantages of optimization algorithms, resulting in insufficient classification accuracy.
The Particle Swarm Optimized Multi-Kernel Support Vector Machine (PSO-MSVM) method is adopted to optimize the fusion of multiple features of hyperspectral images through the particle swarm algorithm. The update strategy and constraints of the particle swarm are set to obtain the optimal kernel matrix weights, which are then combined with SVM for classification.
It significantly improves the classification accuracy of hyperspectral remote sensing images, realizes adaptive learning of multiple features and better expresses information about surface objects, thereby improving the accuracy of land cover category identification.
Smart Images

Figure CN114626459B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of remote sensing image processing technology, and particularly relates to a method and system for joint spatial-spectral classification of hyperspectral images using particle swarm optimization multi-kernel support vector machine. Background Technology
[0002] As hyperspectral images acquire increasingly rich spectral and spatial information about surface objects, their ability to represent these objects has greatly improved. Hyperspectral remote sensing classification, a research hotspot in hyperspectral image processing of surface object information, is widely used in modern military, land resource utilization, marine hydrological monitoring, and precision agriculture. Exploring hyperspectral image classification methods is crucial for distinguishing surface objects and obtaining real-time regional information. Most existing hyperspectral remote sensing image classification studies employ a combined spatial and spectral approach. Research indicates that combining multiple features of hyperspectral images can provide a more accurate and reasonable representation of surface objects, thereby improving classification accuracy and prediction precision.
[0003] Currently, in the process of multi-feature combination optimization for hyperspectral remote sensing image classification, most scholars still use the method of linear combination of multiple features. Most studies often involve manually selecting parameter combinations and conducting experiments using exhaustive methods to find a set of coefficients that are fuzzy close to optimal. This ignores the advantages of optimization algorithms for multi-feature fusion. In some constrained optimization problems with multiple local extrema, the traditional exhaustive method and gradient descent may become unsolvable. Summary of the Invention
[0004] This invention addresses the problem of weak multi-feature fusion performance in existing hyperspectral remote sensing image classification methods by proposing a hyperspectral image spatial-spectral joint classification method and system using particle swarm optimization multi-kernel support vector machine. This method can effectively improve the multi-feature fusion performance of hyperspectral remote sensing images and enhance classification accuracy.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] This invention proposes a hyperspectral image spatial-spectral joint classification method using particle swarm optimization multi-kernel support vector machine, comprising:
[0007] Step 1: Divide the hyperspectral remote sensing image dataset into a training set and a test set, and use feature extraction methods to extract N feature kernel matrices from the hyperspectral images in the training set;
[0008] Step 2: Input the N kernel matrices into the particle swarm optimization algorithm, design the particle swarm's encoding structure, and obtain the weight encoding X. m Velocity vector V i Particle population Q, fitness value Fitness Individual extreme value P best and population extreme value G best The particle swarm is initialized using constrained random initialization.
[0009] Step 3: Set the particle swarm update strategy and add constraints to the particle flight to obtain the weights of each kernel matrix with the highest classification accuracy; fuse the weights with their respective kernel matrices to obtain a kernel matrix that fuses multiple features.
[0010] Step 4: Input the fused kernel matrix into the SVM for training; use the trained SVM classifier model to classify the test set and output the corresponding land cover classification image.
[0011] Further, step 2 includes:
[0012] Step 2.1: Encode the particles using the obtained N feature kernel matrices to obtain...
[0013]
[0014] Where X m Represents weighted encoding, x i X represents m The i-th weight in V i The velocity of the particle represents the direction and magnitude of the next update of the weight parameters, v. im X represents the weight of the i-th weight in population Q. m Flight speed in the group weights; Q represents the particle population, M represents the population size, and the population contains M*N combinations of weight parameters; F itness F represents the fitness value of a particle, indicating how well the combination of weight parameters in the particle performs on the fitness function. m In population Q, X represents X. m The fitness value obtained from group weights; P best Pbest represents the individual extreme value, which is the optimal combination of weight parameters obtained for the current particle. m It is population Q in X m The value with the highest fitness is obtained during the change process; G best It is the population extreme value, representing the optimal combination of weight parameters obtained by all particles in the population;
[0015] Step 2.2: Initialize the particles using the following formula, and simultaneously set the constraints for the particles to complete the initialization with constraints.
[0016] x i =(x max -x min )*rand location +xmin i = 1, 2, ..., N-1
[0017]
[0018] rand location rand is the initialization function for particle positions. velocity An initialization function representing the particle velocity;
[0019] Since the particle value is a linear combination of the basis kernel functions in the support vector machine, the particle value should be a decimal between 0 and 1, and the sum of all weight combinations should be 1.
[0020]
[0021] Further, step 3 includes:
[0022] Step 3.1: Set the particle update strategy. The specific particle update formula is shown in the following equation.
[0023]
[0024]
[0025] Where i = 1, 2, ..., M represents the population number of the particles, k represents the number of iterations, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the group learning factor, and rand() is a random function that takes a decimal number between 0 and 1.
[0026] Step 3.2: Simultaneously, during the particle's flight, add constraints to prevent the particle from flying out of the boundary. The boundary constraints for the particle are as follows:
[0027]
[0028]
[0029] Step 3.3: Iteratively update the N encoded feature kernel matrices to obtain the optimal weights of the N feature kernel matrices and fuse them to obtain a multi-feature synthetic kernel matrix.
[0030] Further, step 4 includes:
[0031] Step 4.1: Transfer the pixels W in the training set i Its label value Y i To form a data pair, we obtain the training sample set S = {(W1,Y1),(W2,Y2),…,(W...} for the SVM classifier. n ,Y n )};n represents the number of pixels in the training set;
[0032] Step 4.2: Use the fused kernel matrix as the kernel function of the SVM classifier, and train the SVM classifier model using the training sample set S;
[0033] Step 4.3: Use the trained SVM classifier model to classify the test set and output the corresponding land cover classification image.
[0034] Another aspect of this invention proposes a hyperspectral image spatial-spectral joint classification system using particle swarm optimization multi-kernel support vector machine, comprising:
[0035] The feature extraction module is used to divide the hyperspectral remote sensing image dataset into a training set and a test set, and to extract N feature kernel matrices from the hyperspectral images in the training set using feature extraction methods;
[0036] The particle swarm initialization module is used to input N kernel matrices into the particle swarm algorithm, design the encoding structure of the particle swarm, and obtain the weight encoding X. m Velocity vector V i Particle population Q, fitness value F itness Individual extreme value P best and population extreme value G best The particle swarm is initialized using constrained random initialization.
[0037] The optimization module is used to set the update strategy for the particle swarm and add constraints to the particle flight to obtain the weights of each kernel matrix with the highest classification accuracy. The weights are then fused with their corresponding kernel matrices to obtain a kernel matrix that fuses multiple features.
[0038] The classification module is used to input the fused kernel matrix into the SVM for training; the trained SVM classifier model is used to classify the test set and output the corresponding land cover classification image.
[0039] Furthermore, the particle swarm initialization module is specifically used for:
[0040] Step 2.1: Encode the particles using the obtained N feature kernel matrices to obtain...
[0041]
[0042] Where X m Represents weighted encoding, x i X represents m The i-th weight in V i The velocity of the particle represents the direction and magnitude of the next update of the weight parameters, v. im X represents the weight of the i-th weight in population Q. mFlight speed in the group weights; Q represents the particle population, M represents the population size, and the population contains M*N combinations of weight parameters; F itness F represents the fitness value of a particle, indicating how well the combination of weight parameters in the particle performs on the fitness function. m In population Q, X represents X. m The fitness value obtained from group weights; P best Pbest represents the individual extreme value, which is the optimal combination of weight parameters obtained for the current particle. m It is population Q in X m The value with the highest fitness is obtained during the change process; G best It is the population extreme value, representing the optimal combination of weight parameters obtained by all particles in the population;
[0043] Step 2.2: Initialize the particles using the following formula, and simultaneously set the constraints for the particles to complete the initialization with constraints.
[0044] x i =(x max -x min )*rand location +x min i = 1, 2, ..., N-1
[0045]
[0046] rand location rand is the initialization function for particle positions. velocity An initialization function representing the particle velocity;
[0047] Since the particle value is a linear combination of the basis kernel functions in the support vector machine, the particle value should be a decimal between 0 and 1, and the sum of all weight combinations should be 1.
[0048]
[0049] Furthermore, the optimization module is specifically used for:
[0050] Step 3.1: Set the particle update strategy. The specific particle update formula is shown in the following equation.
[0051]
[0052]
[0053] Where i = 1, 2, ..., M represents the population number of the particles, k represents the number of iterations, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the group learning factor, and rand() is a random function that takes a decimal number between 0 and 1.
[0054] Step 3.2: Simultaneously, during the particle's flight, add constraints to prevent the particle from flying out of the boundary. The boundary constraints for the particle are as follows:
[0055]
[0056]
[0057] Step 3.3: Iteratively update the N encoded feature kernel matrices to obtain the optimal weights of the N feature kernel matrices and fuse them to obtain a multi-feature synthetic kernel matrix.
[0058] Furthermore, the classification module is specifically used for:
[0059] Step 4.1: Transfer the pixels W in the training set i Its label value Y i To form a data pair, we obtain the training sample set S = {(W1,Y1),(W2,Y2),…,(W...} for the SVM classifier. n ,Y n )};n represents the number of pixels in the training set;
[0060] Step 4.2: Use the fused kernel matrix as the kernel function of the SVM classifier, and train the SVM classifier model using the training sample set S;
[0061] Step 4.3: Use the trained SVM classifier model to classify the test set and output the corresponding land cover classification image.
[0062] Compared with the prior art, the present invention has the following beneficial effects:
[0063] 1. To address the common problem of spatial-spectral joint multi-feature extraction and classification in hyperspectral images, this invention proposes the PSO-MSVM model, which can effectively solve the weight allocation problem in multi-feature fusion, achieve adaptive learning of kernel weights on different datasets, significantly improve HSI classification accuracy, accurately grasp the land cover category information of remote sensing images, and is of great significance for the preparation and implementation of national spatial planning.
[0064] 2. In this invention, when fusing multiple features of hyperspectral images, the particle swarm optimization algorithm is used for fusion; the weights of each kernel matrix with the highest classification accuracy are obtained by the PSO-MSVM model; the optimized classification model can better couple different features, resulting in a more reasonable and clear representation of surface objects.
[0065] 3. Compared with existing hyperspectral remote sensing image classification methods based on spatial-spectral integration, the hyperspectral remote sensing image classification method obtained by this invention combines and optimizes spatial features and spectral features, making full use of the spatial autocorrelation characteristics of ground objects and improving the classification accuracy of HSI. Attached Figure Description
[0066] Figure 1 A flowchart illustrating a hyperspectral image spatial-spectral joint classification method using particle swarm optimization multi-kernel support vector machine provided in an embodiment of the present invention;
[0067] Figure 2 A schematic diagram illustrating the principle framework of a hyperspectral image spatial-spectral joint classification method using particle swarm optimization multi-kernel support vector machine provided in an embodiment of the present invention;
[0068] Figure 3 The dataset land cover categories and sample annotation maps provided for embodiments of the present invention are as follows: a(1)-a(3) represent stereoscopic display images; b(1)-b(3) represent actual land cover images; c(1)-c(3) represent sample label templates;
[0069] Figure 4 The following diagrams show the classification results of the test set provided for embodiments of the present invention: (4-1) represents the classification result on the Pavia University dataset; (4-2) represents the classification result on the Pavia Center dataset; and (4-3) represents the classification result on the Washington DC Mall dataset.
[0070] Figure 5 A comparison chart of the weights of the manual experiment and the optimized weights provided for embodiments of the present invention;
[0071] Figure 6 This is a schematic diagram of the architecture of a hyperspectral image spatial-spectral joint classification system using particle swarm optimization multi-kernel support vector machine, provided as an embodiment of the present invention. Detailed Implementation
[0072] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0073] Combination Figure 1 and Figure 2 As shown, this embodiment of the invention provides a hyperspectral image spatial-spectral joint classification method using particle swarm optimization multi-kernel support vector machine (PSO-MSVM method for short), which includes the following steps:
[0074] S101: Divide the hyperspectral remote sensing image (HSI) dataset into a training set and a test set, and use feature extraction methods to extract N feature kernel matrices from the hyperspectral images in the training set;
[0075] S102: Input N kernel matrices into the particle swarm optimization algorithm, design the particle swarm's encoding structure, and obtain the weight encoding X. m Velocity vector V i Particle population Q, fitness value F itness Individual extreme value P best and population extreme value G best The particle swarm is initialized using constrained random initialization.
[0076] S103: Set the particle swarm update strategy and add constraints during particle flight to obtain the weights of the kernel matrices with the highest classification accuracy; fuse the weights with their respective kernel matrices to obtain a kernel matrix that fuses multiple features.
[0077] S104: Input the fused kernel matrix into the SVM for training; use the trained SVM classifier model to classify the test set and output the corresponding land cover classification image.
[0078] As one possible implementation, step S101 specifically includes:
[0079] 20% of the labeled hyperspectral dataset was divided into a training set and the remainder into a test set. N features of the hyperspectral images in the training set were extracted using different feature extraction methods, such as extracting original spectral features through polynomial kernel equations, extracting spatial features through superpixel segmentation algorithms, and extracting spatial texture features through local binary mode.
[0080] As one possible implementation, step S102 specifically includes:
[0081] S1021: Encode the particles using the obtained N feature kernel matrices to obtain...
[0082]
[0083] Where X m Represents weighted encoding, x i X represents m The i-th weight in V i The velocity of the particle represents the direction and magnitude of the next update of the weight parameters, v. im X represents the weight of the i-th weight in population Q. m Flight speed in the group weights; Q represents the particle population, assuming the population size is M, then the population contains M*N combinations of weight parameters; F itness F represents the fitness value of a particle, indicating how well the combination of weight parameters in the particle performs on the fitness function. m In population Q, X represents X. mThe fitness value obtained from group weights; P best Pbest represents the individual extreme value, which is the optimal combination of weight parameters obtained for the current particle. m It is population Q in X m The value with the highest fitness is obtained during the change process; G best It is the population extreme value, representing the optimal combination of weight parameters obtained by all particles in the population.
[0084] S1022: Initialize the particles using the following formula.
[0085] x i =(x max -x min )*rand location +x min i = 1, 2, ..., N-1
[0086]
[0087] rand location rand serves as the initialization function for particle positions. location Rand takes values in a uniformly distributed range between [0-1], such that the initial weight of the particle is between 0.1 and 0.9. velocity As the initialization function for particle velocity, it takes values with a uniform probability between [-1, 1].
[0088] Since the particle value is a linear combination of the basis kernel functions in the support vector machine, the particle value should be a decimal between 0 and 1, and the sum of all weight combinations should be 1.
[0089]
[0090] As one possible implementation, step S103 specifically includes:
[0091] S1031: The particle's velocity determines the direction and magnitude of its change, which is the change in the value of the weight parameter combination. The particle uses the weight parameter combination and inertia weight w from the previous moment to simulate the particle's inertia during flight. It then uses its own experience to determine the direction and magnitude of the next update based on the optimal parameter combination it finds. Particles share information, using the optimal parameter combinations found by all particles in the population to learn the optimal parameter combinations from other particles. The specific update formula for the particle is shown below.
[0092]
[0093]
[0094] Where i = 1, 2, ..., M represents the population number of the particles, k represents the number of iterations of the optimization algorithm, c1 represents the individual learning factor, c2 represents the population learning factor, and rand() is a random function that takes a decimal number between 0 and 1.
[0095] S1032: Simultaneously, during the particle's flight, constraints are added to prevent the particle from flying out of the boundary. The particle constraint is as follows:
[0096]
[0097]
[0098] To ensure that the weights represented by each particle always add up to 1, during particle updates, assuming the number of kernel functions is N, only the first N-1 kernels are used as the particle's weight parameters for updates, while the Nth weight is...
[0099]
[0100] S1033: Iteratively update the N encoded feature kernel matrices to obtain the optimal weights of the N feature kernel matrices and fuse them to obtain a multi-feature synthetic kernel matrix.
[0101] As one possible implementation, step S104 specifically includes:
[0102] S1041: Transfer the pixels W from the training set i Its label value Y i To form a data pair, we obtain the training sample set S = {(W1,Y1),(W2,Y2),…,(W...} for the SVM classifier. n ,Y n )};n represents the number of pixels in the training set;
[0103] S1042: The fused multi-feature kernel matrix is used as the kernel function of the SVM classifier, and the SVM classifier model is obtained by training the training sample set S.
[0104] S1043: Use the trained SVM classifier model to classify the test set and output the corresponding land cover classification image.
[0105] The following is combined Figures 3 to 5 As shown, experiments are conducted to specifically illustrate the effectiveness and practicality of the present invention.
[0106] The data processing in this experiment was performed on the MATLAB R2018a platform. The network model was trained using the Support Vector Machine (SVM) algorithm. The computing environment was a PC with an AMD Ryzen 4800H CPU (2.90GHz) and 16GB of RAM. The algorithms compared in the experiment included: the multi-scale superpixel spatial spectral synthesis kernel (Ms-SSSK, Ms-RPSK) method, the single-scale superpixel spatial spectral synthesis kernel (Ss-SSSK) method, the synthesis kernel combined with watershed segmentation (WSCSVM) method, the original spatial spectral kernel (SSK) method, and the segmented wavelength synthesis kernel (CK) method.
[0107] To verify the effectiveness and practicality of this invention, an image classification experiment was conducted on data captured by a German airborne Reflective Optics Spectrographic Imaging System. The specific experiment is as follows:
[0108] ROSIS-3 can acquire images of 610×340 pixels, with 115 spectral bands (0.43-0.86m) and a spatial resolution of 1.3m. To quantitatively evaluate the fusion results, this invention conducted simulation experiments on this data: First, PCA was used to extract the first principal component of the HSI. At four scales (400, 800, 1600, and 3200), the first principal component was segmented into superpixels using the ERS algorithm. At each scale, the similarity between any superpixels was calculated using the RBF kernel function, forming a spatial kernel matrix. Then, the kernel matrices at all scales were summed and averaged to form the final superpixel spatial kernel matrix. For any pixel in the HSI, the average value of the pixels at all bands was calculated, and the similarity between the average values of any pixels was calculated using the RBF kernel function, forming the original spectral kernel matrix. The two kernel matrices are then input into PSO-MSVM. First, particle encoding is configured, and corresponding constraints are set. Next, weights are randomly initialized. Through iterative updates using the particle swarm optimization algorithm, the spatial kernel matrix weights and spectral kernel matrix weights that achieve the best classification results are obtained. These weights are then combined and output to SVM for HSI classification. Finally, a given hyperspectral image dataset is used as a reference image, and the results are compared with other classification methods to calculate the corresponding quantitative performance metrics.
[0109] This invention uses three HSI datasets—Pavia University, Pavia Center, and Washington DC Mall—to verify the effectiveness and feasibility of the PSO-MSVM method, and verifies the classification model performance using a 5-fold cross-validation method. The optimal values of each parameter were obtained through a grid search method during the experiment, with the RBF kernel function parameter g set to 4.5639, the penalty factor c to 16.9873, and the highest degree d of the polynomial kernel function set to 3. A comparative analysis of the data using existing image classification methods and the image classification method of this invention yields the following results: Figure 4 As shown. Among them. Figure 4 (4-1) shows the classification results on the Pavia University dataset; Figure 4 (4-2) shows the classification results on the Pavia Center dataset; Figure 4 (4-3) shows the classification results on the Washington DC Mall dataset; Figure 3 This is the original hyperspectral image. From Figure 4 As shown in Figure (4-1), grassland and bare soil are relatively concentrated, while trees and bricks are more dispersed. The optimized multinomial spectral kernel weight and multi-scale superpixel spatial kernel weight are 0.6932 and 0.3068, respectively. The increase in the multi-scale superpixel spatial kernel weight better preserves the spatial structural features of the image, thus improving the accuracy of the more concentrated painted metal panels and bare soil. The accuracy of asphalt pavement, which exhibits a spatially clustered pattern, is also improved. Similarly, the accuracy of the relatively concentrated painted metal panels is slightly improved due to the increase in the multi-scale superpixel spatial kernel weight, and the overall classification kappa is also improved to some extent. Figure 4 As shown in Figure (4-2), the Pavia Center dataset has a relatively uniform overall distribution. Tiles, asphalt pavement, and bricks are concentrated and relatively easy to classify. Trees are predominantly distributed in the upper left, and grassland is predominantly distributed in the lower right, with relatively few surrounding interference categories. The optimized multinomial spectral kernel weight and multi-scale superpixel spatial kernel weight are 0.2430 and 0.7570, respectively. The increased multinomial spectral kernel weight enhances the distinguishability between objects with different spectral curves, thus improving the accuracy for tiles and trees. Similarly, the accuracy for bare soil, which is spatially abundant around other categories, is slightly improved due to the increased multinomial spectral kernel weight. Figure 4As shown in Figure (4-3), the overall distribution of Wastington DC Mall is relatively sparse, with a large area of residential areas and a small area of shaded areas. The optimized polynomial spectral kernel weight and multi-scale superpixel spatial kernel weight are 0.75 and 0.15, respectively. Due to the increase in the proportion of multi-scale superpixel spatial kernel, the accuracy of residential areas with obvious spatial clustering characteristics is improved. Similarly, the accuracy of highways, which are relatively independent in spatial distribution, is also improved to a certain extent.
[0110] Table 1 presents the performance indicators of the method of this invention and the comparative method. The following performance indicators were used in this experiment: classification accuracy for various land features and overall classification accuracy (OA) of the testing machine.
[0111] In Table 1, the bold numbers represent the best value for each metric. From the perspective of various objective evaluation metrics for image classification, the method proposed in this invention outperforms other methods in all aspects.
[0112] Table 1. Quantitative evaluation results of different methods for image classification of datasets.
[0113]
[0114]
[0115] The experimental results above demonstrate that the method of the present invention, which uses particle swarm optimization algorithm to couple multiple features, can significantly improve the classification accuracy of hyperspectral remote sensing images. Using this model, multiple features can be combined more effectively, making the classification map of the obtained area more spatially clustered. This allows for accurate classification of small-area land features and better distinguishes between land features with similar spectral characteristics and large-area scattered land features.
[0116] Based on the above embodiments, such as Figure 6 As shown, this invention also proposes a hyperspectral image spatial-spectral joint classification system using particle swarm optimization multi-kernel support vector machine, comprising:
[0117] The feature extraction module is used to divide the hyperspectral remote sensing image dataset into a training set and a test set, and to extract N feature kernel matrices from the hyperspectral images in the training set using feature extraction methods;
[0118] The particle swarm initialization module is used to input N kernel matrices into the particle swarm algorithm, design the encoding structure of the particle swarm, and obtain the weight encoding X. m Velocity vector V i Particle population Q, fitness value F itness Individual extreme value P best and population extreme value Gbest The particle swarm is initialized using constrained random initialization.
[0119] The optimization module is used to set the update strategy for the particle swarm and add constraints to the particle flight to obtain the weights of each kernel matrix with the highest classification accuracy. The weights are then fused with their corresponding kernel matrices to obtain a kernel matrix that fuses multiple features.
[0120] The classification module is used to input the fused kernel matrix into the SVM for training; the trained SVM classifier model is used to classify the test set and output the corresponding land cover classification image.
[0121] Furthermore, the particle swarm initialization module is specifically used for:
[0122] Step 2.1: Encode the particles using the obtained N feature kernel matrices to obtain...
[0123]
[0124] Where X m Represents weighted encoding, x i X represents m The i-th weight in V i The velocity of the particle represents the direction and magnitude of the next update of the weight parameters, v. im X represents the weight of the i-th weight in population Q. m Flight speed in the group weights; Q represents the particle population, M represents the population size, and the population contains M*N combinations of weight parameters; F itness F represents the fitness value of a particle, indicating how well the combination of weight parameters in the particle performs on the fitness function. m In population Q, X represents X. m The fitness value obtained from group weights; P best Pbest represents the individual extreme value, which is the optimal combination of weight parameters obtained for the current particle. m It is population Q in X m The value with the highest fitness is obtained during the change process; G best It is the population extreme value, representing the optimal combination of weight parameters obtained by all particles in the population;
[0125] Step 2.2: Initialize the particles using the following formula, and simultaneously set the constraints for the particles to complete the initialization with constraints.
[0126] x i =(x max -x min )*rand location +x min i = 1, 2, ..., N-1
[0127]
[0128] rand location rand is the initialization function for particle positions. velocity An initialization function representing the particle velocity;
[0129] Since the particle value is a linear combination of the basis kernel functions in the support vector machine, the particle value should be a decimal between 0 and 1, and the sum of all weight combinations should be 1.
[0130]
[0131] Furthermore, the optimization module is specifically used for:
[0132] Step 3.1: Set the particle update strategy. The specific particle update formula is shown in the following equation.
[0133]
[0134]
[0135] Where i = 1, 2, ..., M represents the population number of the particles, k represents the number of iterations, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the group learning factor, and rand() is a random function that takes a decimal number between 0 and 1.
[0136] Step 3.2: Simultaneously, during the particle's flight, add constraints to prevent the particle from flying out of the boundary. The boundary constraints for the particle are as follows:
[0137]
[0138]
[0139] Step 3.3: Iteratively update the N encoded feature kernel matrices to obtain the optimal weights of the N feature kernel matrices and fuse them to obtain a multi-feature synthetic kernel matrix.
[0140] Furthermore, the classification module is specifically used for:
[0141] Step 4.1: Transfer the pixels W in the training set i Its label value Y i To form a data pair, we obtain the training sample set S = {(W1,Y1),(W2,Y2),…,(W...} for the SVM classifier. n ,Y n )};n represents the number of pixels in the training set;
[0142] Step 4.2: Use the fused kernel matrix as the kernel function of the SVM classifier, and train the SVM classifier model using the training sample set S;
[0143] Step 4.3: Use the trained SVM classifier model to classify the test set and output the corresponding land cover classification image.
[0144] In summary, this invention proposes the PSO-MSVM model to address the common problem of spatial-spectral joint multi-feature extraction and classification in hyperspectral images. This model can effectively solve the weight allocation problem in multi-feature fusion, achieve adaptive learning of kernel weights on different datasets, significantly improve HSI classification accuracy, and accurately grasp the land cover category information of remote sensing images, which is of great significance for the preparation and implementation of national spatial planning.
[0145] This invention fuses multiple features of hyperspectral images using a particle swarm optimization algorithm; the PSO-MSVM model is used to obtain the weights of each kernel matrix with the highest classification accuracy; the optimized classification model allows for better coupling of different features, resulting in a more reasonable and clear representation of surface objects.
[0146] Compared with existing hyperspectral remote sensing image classification methods based on spatial-spectral integration, the hyperspectral remote sensing image classification method obtained by this invention combines and optimizes spatial and spectral features, making full use of the spatial autocorrelation characteristics of ground objects and improving the classification accuracy of HSI.
[0147] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A hyperspectral image spatial-spectral joint classification method using particle swarm optimization multi-kernel support vector machine, characterized in that, include: Step 1: Divide the hyperspectral remote sensing image dataset into a training set and a test set. Use different feature extraction methods to extract N feature kernel matrices from the hyperspectral images in the training set, including original spectral features, spatial features, and spatial texture features. Step 2: Input the N kernel matrices into the particle swarm optimization algorithm, design the particle swarm's encoding structure, and obtain the weight encoding X. m Velocity vector V i Particle population Q, fitness value F itness Individual extreme value P best and population extreme value G best The particle swarm is initialized using constrained random initialization. Step 3: Set the particle swarm update strategy and add constraints during particle flight to obtain the weights of the kernel matrices with the highest classification accuracy; fuse the weights with their corresponding kernel matrices to obtain a multi-feature kernel matrix; during particle update, only the first N-1 weights are optimized, and the Nth weight is set to a value that satisfies the highest classification accuracy. x i X represents m The i-th weight in; Step 4: Input the fused kernel matrix into the SVM for training; The trained SVM classifier model is used to classify the test set, and the corresponding ground feature classification image is output. Step 2 includes: Step 2.1: Encode the particles using the obtained N feature kernel matrices to obtain... Where X m Represents weighted encoding, x i X represents m The i-th weight in V i The velocity of the particle represents the direction and magnitude of the next update of the weight parameters, v. im X represents the weight of the i-th weight in population Q. m Flight speed in the group weights; Q represents the particle population, M represents the population size, and the population contains M*N combinations of weight parameters; F itness F represents the fitness value of a particle, indicating how well the combination of weight parameters in the particle performs on the fitness function. m In population Q, X represents X. m The fitness value obtained from group weights; P best Pbest represents the individual extreme value, which is the optimal combination of weight parameters obtained for the current particle. m It is population Q in X m The value with the highest fitness is obtained during the change process; G best It is the population extreme value, representing the optimal combination of weight parameters obtained by all particles in the population; Step 2.2: Initialize the particles using the following formula, and simultaneously set the constraints for the particles to complete the initialization with constraints. x i =(x max -x min )*rand location +x min ,i=1,2,…,N-1 rand location rand is the initialization function for particle positions. velocity An initialization function representing the particle velocity; Since the value of a particle is a linear combination of the basis kernel functions in a support vector machine, the particle's value should be a decimal between 0 and 1, and the sum of all weight combinations should be 1.
2. The hyperspectral image spatial-spectral joint classification method using particle swarm optimization multi-kernel support vector machine according to claim 1, characterized in that, Step 3 includes: Step 3.1: Set the particle update strategy. The specific particle update formula is shown in the following equation. Where i = 1, 2, ..., M represents the population number of the particles, k represents the number of iterations, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the group learning factor, and rand() is a random function that takes a decimal between 0 and 1. Step 3.2: Simultaneously, during the particle's flight, add constraints to prevent the particle from flying out of the boundary. The boundary constraints for the particle are as follows: 0<x i <1, Step 3.3: Iteratively update the N encoded feature kernel matrices to obtain the optimal weights of the N feature kernel matrices and fuse them to obtain a multi-feature synthetic kernel matrix.
3. The hyperspectral image spatial-spectral joint classification method using particle swarm optimization multi-kernel support vector machine according to claim 1, characterized in that, Step 4 includes: Step 4.1: Transfer the pixels W in the training set i Its label value Y i To form a data pair, we obtain the training sample set S = {(W1,Y1),(W2,Y2),…,(W...} for the SVM classifier. n ,Y n )};n represents the number of pixels in the training set; Step 4.2: Use the fused kernel matrix as the kernel function of the SVM classifier, and train the SVM classifier model using the training sample set S; Step 4.3: Use the trained SVM classifier model to classify the test set and output the corresponding land cover classification image.
4. A hyperspectral image spatial-spectral joint classification system using particle swarm optimization multi-kernel support vector machine, characterized in that, include: The feature extraction module is used to divide the hyperspectral remote sensing image dataset into training and testing sets, and use different feature extraction methods to extract N feature kernel matrices of hyperspectral images in the training set, including original spectral features, spatial features and spatial texture features; The particle swarm initialization module is used to input N kernel matrices into the particle swarm algorithm, design the encoding structure of the particle swarm, and obtain the weight encoding X. m Velocity vector V i Particle population Q, fitness value F itness Individual extreme value P best and population extreme value G best The particle swarm is initialized using constrained random initialization. The optimization module sets the update strategy for the particle swarm and adds constraints during particle flight, ultimately obtaining the weights of the kernel matrices that achieve the highest classification accuracy. These weights are then fused with their corresponding kernel matrices to obtain a multi-feature kernel matrix. During particle update, only the first N-1 weights are optimized, with the Nth weight being [value missing]. x i X represents m The i-th weight in; The classification module is used to input the fused kernel matrix into the SVM for training; the trained SVM classifier model is used to classify the test set and output the corresponding land cover classification image; The particle swarm initialization module is specifically used for: Step 2.1: Encode the particles using the obtained N feature kernel matrices to obtain... Where X m Represents weighted encoding, x i X represents m The i-th weight in V i The velocity of the particle represents the direction and magnitude of the next update of the weight parameters, v. im X represents the weight of the i-th weight in population Q. m Flight speed in the group weights; Q represents the particle population, M represents the population size, and the population contains M*N combinations of weight parameters; F itness F represents the fitness value of a particle, indicating how well the combination of weight parameters in the particle performs on the fitness function. m In population Q, X represents X. m The fitness value obtained from group weights; P best Pbest represents the individual extreme value, which is the optimal combination of weight parameters obtained for the current particle. m It is population Q in X m The value with the highest fitness is obtained during the change process; G best It is the population extreme value, representing the optimal combination of weight parameters obtained by all particles in the population; Step 2.2: Initialize the particles using the following formula, and simultaneously set the constraints for the particles to complete the initialization with constraints. x i =(x max -x min )*rand location +x min ,i=1,2,...,N-1 rand location rand is the initialization function for particle positions. velocity An initialization function representing the particle velocity; Since the value of a particle is a linear combination of the basis kernel functions in a support vector machine, the particle's value should be a decimal between 0 and 1, and the sum of all weight combinations should be 1.
5. The hyperspectral image spatial-spectral joint classification system using particle swarm optimization multi-kernel support vector machine according to claim 4, characterized in that, The optimization module is specifically used for: Step 3.1: Set the particle update strategy. The specific particle update formula is shown in the following equation. Where i = 1, 2, ..., M represents the population number of the particles, k represents the number of iterations, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the group learning factor, and rand() is a random function that takes a decimal between 0 and 1. Step 3.2: Simultaneously, during the particle's flight, add constraints to prevent the particle from flying out of the boundary. The boundary constraints for the particle are as follows: 0<x i <1, Step 3.3: Iteratively update the N encoded feature kernel matrices to obtain the optimal weights of the N feature kernel matrices and fuse them to obtain a multi-feature synthetic kernel matrix.
6. The hyperspectral image spatial-spectral joint classification system using particle swarm optimization multi-kernel support vector machine according to claim 4, characterized in that, The classification module is specifically used for: Step 4.1: Transfer the pixels W in the training set i Its label value Y i To form a data pair, we obtain the training sample set S = {(W1,Y1),(W2,Y2),…,(W...} for the SVM classifier. n ,Y n )};n represents the number of pixels in the training set; Step 4.2: Use the fused kernel matrix as the kernel function of the SVM classifier, and train the SVM classifier model using the training sample set S; Step 4.3: Use the trained SVM classifier model to classify the test set and output the corresponding land cover classification image.
Citation Information
Patent Citations
Hyperspectral remote sensing classification method based on support vector machine under particle optimization
CN102750551A
Method for optimizing support vector machine on basis of particle swarm optimization algorithm
WO2018072351A1