CN112784907A - Hyperspectral image classification method based on spatial spectral feature and BP neural network - Google Patents

Hyperspectral image classification method based on spatial spectral feature and BP neural network Download PDF

Info

Publication number
CN112784907A
CN112784907A CN202110113912.XA CN202110113912A CN112784907A CN 112784907 A CN112784907 A CN 112784907A CN 202110113912 A CN202110113912 A CN 202110113912A CN 112784907 A CN112784907 A CN 112784907A
Authority
CN
China
Prior art keywords
hyperspectral image
neural network
hyperspectral
classification
spectral
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110113912.XA
Other languages
Chinese (zh)
Inventor
赵晋陵
严豪
董莹莹
黄林生
梁栋
黄文江
翁士状
张东彦
郑玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui University
Aerospace Information Research Institute of CAS
Original Assignee
Anhui University
Aerospace Information Research Institute of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anhui University, Aerospace Information Research Institute of CAS filed Critical Anhui University
Priority to CN202110113912.XA priority Critical patent/CN112784907A/en
Publication of CN112784907A publication Critical patent/CN112784907A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • G06V20/194Terrestrial scenes using hyperspectral data, i.e. more or other wavelengths than RGB

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a hyperspectral image classification method based on a spatio-spectral feature and a BP neural network, and relates to the technical field of image processing. Firstly, performing dimensionality reduction on a hyperspectral image through PCA (principal component analysis), and acquiring spectral information with low-dimensional wave bands and remarkable characteristics; extracting spatial texture information of the hyperspectral image through an LBP algorithm; and finally, the spectral information and the spatial texture information form a feature vector of the hyperspectral image in a serial fusion mode, and the feature vector is input into a BP neural network for training and classification. The method is applied to the hyperspectral image processing of Pavia University, Salinas and Botswana, and the classification precision reaches 93.67%, 98.09% and 92.97% respectively. Compared with the classical algorithm KNN and several algorithms with superior performance, the algorithm of the invention has the advantages of improving the overall precision, the average precision and the Kappa coefficient, and proving the practicability of the method of the invention.

Description

Hyperspectral image classification method based on spatial spectral feature and BP neural network
Technical Field
The invention relates to the technical field of image processing, in particular to a hyperspectral image classification method based on a spatial spectrum feature and a BP neural network.
Background
Hyperspectral remote sensing (hyperspectral remote sensing) originated in the 80 s of the 20 th century, and is a brand new remote sensing technology developed on the basis of imaging spectroscopy, which utilizes very narrow and continuous electronic wave bands to continuously remotely sense and detect ground objects, and provides dozens or even hundreds of narrow bands for each pixel, thereby generating a complete and continuous smooth curve. The method is widely applied to the fields of aerospace, remote sensing science, biomedicine, agriculture, meteorology and the like, and becomes one of the most advanced technologies in the field of remote sensing.
The hyperspectral image classification is an important content of hyperspectral remote sensing image processing and is a popular research direction in recent years, the hyperspectral image has the characteristics of multiple wave bands and strong intersegment correlation, information redundancy of the hyperspectral image is easily caused, dimension disasters are caused, and the problem of difficulty in classification is solved, so that an efficient dimension reduction and classification method is urgently needed.
Disclosure of Invention
The hyperspectral image classification method based on the spatial spectrum features and the BP neural network can solve the problems in the prior art.
The invention provides a hyperspectral image classification method based on a spatio-spectral feature and a BP neural network, which comprises the following steps of:
step 1, reading a hyperspectral image, performing dimensionality reduction on the read hyperspectral image by adopting a Principal Component Analysis (PCA) method to obtain a plurality of principal components with the largest variance contribution rate, using the principal components as spectral features of the hyperspectral image, and generating corresponding spectral feature vectors;
step 2, extracting spatial texture features of the hyperspectral images of each wave band by adopting an LBP local binary algorithm to obtain an LBP texture feature data set, then performing dimensionality reduction processing on the data set by adopting a PCA principal component analysis method to obtain a plurality of principal components with the largest variance contribution rate, and generating corresponding spatial feature vectors as the spatial features of the hyperspectral images;
step 3, fusing the obtained spectral feature vector and the obtained spatial feature vector in a vector superposition mode to generate a space-spectrum feature matrix;
and 4, inputting the generated space-spectrum feature matrix into a BP neural network for training, and performing hyperspectral ground object classification.
The hyperspectral image classification method based on the spatio-spectral features and the BP neural network comprises the steps of firstly, reducing the dimension of a hyperspectral image through PCA to obtain spectral information with low-dimensional wave bands and remarkable features; extracting spatial texture information of the hyperspectral image through an LBP algorithm; and finally, the spectral information and the spatial texture information form a feature vector of the hyperspectral image in a serial fusion mode, and the feature vector is input into a BP neural network for training and classification. The method is applied to the processing of the Pavia University, Salinas and Botswana hyperspectral images, the classification precision respectively reaches 93.67 percent, 98.09 percent and 92.97 percent, in the Pavia University, the classification precision of Sheets classes reaches the highest 99.94 percent, and the lowest classification precision is 75.52 percent of Bricks classes; in Salinas, the classification precision of the ground objects of each category reaches over 90 percent, the highest classification precision is 100 percent of that of Brocoil-green-beans-1, and the lowest classification precision is 90.18 percent of that of Vinyard-untrained; in Botswana with a small sample size, the better classification effect is also achieved, the best classification effect is 100% of the Exposed soils class, and the lowest classification effect is 81.51% of the Riparian class; compared with the classical algorithm KNN and several algorithms with superior performance, the algorithm disclosed by the invention is improved in overall precision, average precision and Kappa coefficient, and the practicability of the method disclosed by the invention is proved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of the classification method of the present invention;
FIG. 2 is an example of LBP local binary computation;
FIG. 3 is a model diagram of a BP neural network;
FIG. 4 is a schematic representation of the Pavia University pseudo-color image and the distribution of real features in an experiment;
FIG. 5 shows a Salinas pseudo color image and a real feature distribution;
FIG. 6 shows a Botswana pseudo color image and a distribution of real features;
FIG. 7 is a graph showing the effect of different principal component numbers on classification accuracy;
FIG. 8 is a graph of the impact of different hidden layer neuron numbers on classification accuracy.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, the invention provides a hyperspectral image classification method based on spatio-spectral features and a BP neural network, which comprises the following steps:
step 1, reading a hyperspectral image, performing dimensionality reduction on the read hyperspectral image by adopting a Principal Component Analysis (PCA) method to obtain a plurality of principal components with the largest variance contribution rate, using the principal components as spectral features of the hyperspectral image, and generating corresponding spectral feature vectors.
And 2, extracting spatial texture features from the hyperspectral images of each wave band by adopting an LBP local binary algorithm to obtain an LBP texture feature data set, performing dimensionality reduction processing on the data set by adopting a PCA principal component analysis method to obtain a plurality of principal components with the largest variance contribution rate, using the principal components as the spatial features of the hyperspectral images, and generating corresponding spatial feature vectors.
And 3, fusing the obtained spectral feature vector and the spatial feature vector in a vector superposition mode, specifically, serially adding the spatial feature vector to the tail end of the spectral feature vector to generate a space-spectrum feature matrix.
And 4, inputting the generated space-spectrum feature matrix into a BP neural network for training, performing hyperspectral ground object classification, and finally performing precision evaluation.
Each step is described in detail below.
In the step 1, the dimensionality of the hyperspectral image based on PCA principal component analysis is reduced according to the following principle: firstly, solving a covariance matrix of an original hyperspectral image, calculating each eigenvalue of the covariance matrix by using a solution eigen equation, arranging the eigenvalues according to the sequence from big to small, and solving a corresponding eigenvector. The orthogonal transformation matrix formed by the characteristic vectors of the original image is subjected to linear transformation to obtain a transformed image matrix, and basically the first wave bands represent main information of the original hyperspectral image, so that the data volume is effectively compressed, key information is obtained, and data redundancy is greatly reduced.
For the hyperspectral image data with dimension L multiplied by H multiplied by N, L and H are respectively the width and height of the hyperspectral image, and N is the dimension of the hyperspectral image, namely the number of wave bands. The hyperspectral image needs to be converted into an observation sample set with dimensions of lxh before PCA principal component analysis.
With X ═ X1,x2,…,xi,…,xD]Representing a hyperspectral image, where D ═ LxH, xiIs an N-dimensional vector and consists of pixel values of N wave bands at the same position. The principal component analysis of image X was performed as follows:
(1) and calculating a mean vector mu and a covariance matrix sigma of the hyperspectral image.
Figure BDA0002919900700000041
Figure BDA0002919900700000042
Wherein [ mu ] is12,...,μD],Ij(i) Representing the value of the picture element of the ith picture element in the jth band.
(2) And solving the eigenvalue lambda and the eigenvector T of the covariance matrix sigma.
(λI-Σ)T=0
Where I is the identity matrix, let λ12,...,λNIs the characteristic root of the covariance matrix, and λ1≥λ2≥...≥λNThe corresponding feature vector is T1,T2,...,TNAn orthogonal transformation matrix is obtained:
W=[T1,T2,...,TN]
the orthogonal transformation matrix satisfies:
WWT=WTW=I
(3) and (5) performing linear transformation on the hyperspectral image.
Y=WTX
And Y is the transformed image matrix. Usually, the first few principal components in the image matrix, i.e. the ones with the largest variance contribution ratio, contain most of the information of the hyperspectral image, while the latter ones are mainly noisy images containing little information.
In step 2, an LBP local binary algorithm is initially proposed by t.ojala, an LBP operator is defined in a window of 3 × 3, a window center pixel is used as a threshold, 8 adjacent pixels are compared with the LBP operator, if the value of the surrounding pixels is greater than the value of the center pixel, the position of the pixel point is marked as 1, otherwise, the position is 0. Thus, after comparing 8 points in a 3 × 3 neighborhood, 8-bit binary numbers are generated, which are usually converted into decimal numbers, i.e. LBP codes, and 256 kinds of the binary numbers are obtained, the LBP value of the center pixel of the window can be obtained, and the LBP value can be used to reflect the texture information of the region.
For a given pixel (x) in any one imagec,yc) Center pixel (x)c,yc) And comparing the binary code with the gray value of 8 adjacent pixels to obtain an ordered binary combination, which is defined as LBP, wherein the binary code is expressed as a decimal form of 8-bit binary number:
Figure BDA0002919900700000051
in the formula icRepresents the center pixel (x)c,yc) Gray value of inRepresenting the grey values of the pixels in the neighborhood of the central pixel 8. The LBP binary system code has invariance to any monotonic gray scale transformation, i.e. the binary code of the local neighborhood remains unchanged before and after transformation.
Wherein:
Figure BDA0002919900700000052
FIG. 2 is an exemplary local binary calculation of LBP in the neighborhood of 8, where (a) is a 3 × 3 window, and the binary set shown in (b) can be obtained according to the LBP value rule described above, and the binary code is (LBP)210011100, (c) is the code set of the binary code, which is equivalent to the weighting coefficient set of the binary code, and the corresponding LBP is LBP 4+8+16+128 156.
In the step 4, the BP neural network has any complex pattern classification capability and excellent multidimensional function mapping capability, and the BP neural network has an input layer, a hidden layer and an output layer. Basically, the BP algorithm calculates the minimum value of an objective function by using a network error square as the objective function and adopting a gradient descent method. Before prediction, network training is firstly carried out, and the training network has associative memory and prediction capabilities.
The training process of the BP neural network comprises the following steps:
(1) and (5) initializing the network. Determining the number o of nodes of the input layer, the number l of nodes of the hidden layer and the number m of nodes of the output layer of the network according to the input and output sequence (P, Q) of the system, and initializing the connection weight w among neurons of the input layer, the hidden layer and the output layerrsAnd wstInitializing a hidden layer threshold a, outputting a layer threshold b, and giving a learning rate and a neuron excitation function.
(2) The hidden layer outputs the computation. Connecting the input layer and the hidden layer according to the input variable P to obtain the weight wrsAnd a hidden layer threshold a, calculating a hidden layer output H:
Figure BDA0002919900700000061
in the formula, f is a hidden layer excitation function, the function has a multilayer expression form, and the sigmoid function can be expressed as:
Figure BDA0002919900700000062
(3) and outputting layer calculation. According to the hidden layer output H, connecting the weight wstAnd a threshold b, calculating the prediction output O of the BP neural network:
Figure BDA0002919900700000063
(4) and (4) error calculation. And calculating the network prediction error e according to the network prediction output O and the expected output C.
et=Ct-Ot
(5) And updating the weight value. Updating the network connection weight w according to the network prediction error ersAnd wst
Figure BDA0002919900700000071
wst=wst+ηHset
In the formula, η is the learning rate.
(6) And updating the threshold value. The thresholds a, b are updated according to the network prediction error e.
Figure BDA0002919900700000072
bt=bt+et
(7) And (4) judging whether the iteration of the algorithm is finished or not, and if not, returning to the step (2).
The BP neural network model is shown in fig. 3.
In step 4, in order to evaluate the performance of the method of the present invention, Overall Accuracy (OA), Average Accuracy (AA) and Kappa coefficient calculated based on the confusion matrix are used as evaluation indexes.
The Overall Accuracy (OA) is the ratio between the number of samples the model predicts correctly over all test sets and the total number of samples. The Average Accuracy (AA) is the ratio of the classification accuracy of the model to each class to the number of classes in the data set. The calculation formula of OA and AA is as follows:
Figure BDA0002919900700000073
Figure BDA0002919900700000074
wherein V is the number of classes of the class, VuuIs the correct classification number of the u-th type of picture elements, i.e. the value on the principal diagonal of the confusion matrix, vuzIs the number of actually correct classifications or misclassifications.
The Kappa coefficient is generally used for consistency check and can also be used for measuring classification accuracy. The Kappa calculation range is-1 to 1, but usually Kappa falls between 0 and 1, and the Kappa can be divided into five groups to represent consistency of different levels as shown in the table:
TABLE 1 Classification Effect for different Kappa coefficients
Figure BDA0002919900700000075
Figure BDA0002919900700000081
The Kappa coefficient calculation formula is as follows:
Figure BDA0002919900700000082
wherein U is the total number of pixels used for precision evaluation, vu+Is the total number of picture elements of the u-th class in the actual class, v+uThe total number of the picture elements of the u-th class in the measured class.
Experiments and analyses
In order to test the feasibility of the method, the currently most commonly used hyper-spectral image classification data set is selected: pavia University, Salinas, and Botswana. In the experiment, three selected hyperspectral image data sets are introduced in detail, then the influence on the classification effect is specifically analyzed from the aspects of two parameters, namely the principal component dimension and the number of neurons in a hidden layer, and finally, the method is compared with the traditional method and discussed.
Experimental data
The Pavia University hyperspectral image data is Italy Pavia University data acquired by a ROSIS sensor in 2003, the size of the Pavia University data is 610 multiplied by 340 pixels, the spatial resolution of 1.3m is realized, the spectral range is 0.43-0.86 mu m, 115 wave bands are totally arranged, 12 wave bands with strong noise and water vapor absorption capacity are eliminated in the experiment, the remaining 103 wave bands are used for classification experiments, and an interested training area and a test area which are measured synchronously are provided. The pave University pseudo-color image is shown as the left image in fig. 4, the corresponding real feature distribution is shown as the right image in fig. 4, the image contains 9 types of features including Trees (tress), Asphalt roads (alphalt), Bricks (Bricks), pastures (Meadows), Gravel (Gravel) and the like, and the sample types and sample amounts are shown in table 2.
TABLE 2 Pavia University dataset sample information
Figure BDA0002919900700000083
Figure BDA0002919900700000091
The Salinas dataset was collected by the AVIRIS sensor in the valley region of Saliners, Calif. The area covers 512 rows and 217 columns, contains 111104 pixels, has a spatial resolution of 3.7m, contains 224 bands, removes 20 bands affected by noise, and takes the remaining 204 band data as a data set of the experiment. The feature types include 16 types, the pseudo-color image is shown as the left image in fig. 5, the real feature distribution map is shown as the right image in fig. 5, and each feature type and sample information are shown in table 3.
TABLE 3 Salinas dataset sample information
Figure BDA0002919900700000092
The Botswana hyperspectral data set is an image of the delta area of Powerna Okavango south Africa acquired by a Hyperion sensor on an EO-1 satellite of NASA, the spectral range is 0.44-2.5 μm, the size is 1476 x 256 pixels, the wavelength is 242 wave bands, and the spectral resolution is 10 nm. The image was radiation corrected to remove noise, atmospheric and moisture absorption and overlapping bands leaving a total of 145 bands for classification experiments. The Botswana pseudo color image is shown as the left image in fig. 6, the corresponding distribution of real features is shown as the right image in fig. 6, the figure totally contains 14 types of features, and the sample types and sample amounts are shown in table 4.
Table 4 Botswana data sample information
Figure BDA0002919900700000093
Figure BDA0002919900700000101
Parameter setting
In the BP neural network model, there are many important network parameters, which can directly affect the performance of the model, such as the learning rate, the number of neurons in the hidden layer, and the dimension of the feature vector input into the model. The parameters of the hyperspectral and spatial spectrum joint classification method based on the spatial spectrum feature-LBP and BP neural network mainly comprise the number p of principal components, the number l of hidden layer neurons in BP network training, learning rate and a training error target. In order to improve the accuracy and the precision of the experiment, each algorithm is repeated for ten times, and the classification precision of the ten experiments is averaged to be used as a final result. The learning rate influences the speed of network convergence and whether the network can converge, and the network convergence can be ensured by setting a smaller learning rate, but the convergence is slower. On the contrary, if the learning rate is set to be larger, the network training may not be converged, and the recognition effect may be affected. According to the existing studies, the learning rates of the Pavia University data, the Salinas data set, and the Botswana data set were set to 0.010, 0.001, and 0.010, respectively, in the experiment.
Firstly, the method sets the main component numbers with different gradients and analyzes the influence on the classification results of the three data sets through the overall classification precision. The classification impact of different principal component numbers on the Pavia University, Salinas, and Botswana datasets is shown in tables 5, 6, and 7.
TABLE 5 Effect of Pavia University dataset parameter p on Classification accuracy
Figure BDA0002919900700000102
TABLE 6 influence of Salinas dataset parameter p on Classification accuracy
Figure BDA0002919900700000111
TABLE 7 influence of Botswana dataset parameter p on classification accuracy
Figure BDA0002919900700000112
As shown in fig. 7, the data shows the effect of different principal component numbers on the classification accuracy. It can be observed that, on the Pavia University dataset, as the number of principal components increases, the overall accuracy shows a steady rising trend, and by the time the number of principal components is 15, the overall accuracy reaches 94.63%, as shown in table 5, when the number of principal components continues to increase, the accuracy may decrease, and finally shows a steady trend. On the Botswana dataset, the same trend as on the Pavia University dataset is shown, and when the number of the principal components reaches 15, the total precision reaches the highest value of 93.13%, and finally, the trend is stable. On the Salinas data set, the overall accuracy slowly increases with the increase of the number of the main components, stabilizes at about 97% to 98%, and finally tends to stabilize when the number of the main components reaches 20 dimensions, and the overall accuracy reaches a stable value of about 98.04%. In general, when the principal component dimension selection is low, the influence on the Pavia University dataset and the Botswana dataset is large, the influence on the Salinas dataset is small, and after the principal component dimension is increased, the overall classification precision of the three datasets is improved, an appreciable value is reached, and finally the three datasets tend to be stable.
The number of hidden layer neurons is also an important parameter influencing the classification precision, the total precision and the Kappa index under 10, 20, 30, 40, 50 and 60 are respectively set for the number l of different hidden layer neurons with the gradient of 10, and the influence of the number l of the neurons on the classification precision of the Pavia University data set, the Salinas data set and the Botswana data set is analyzed. The impact of different hidden layer neuron numbers on the classification accuracy of the Pavia University dataset, the Salinas dataset, and the Botswana dataset is shown in table 8, table 9, and table 10.
TABLE 8 Effect of Pavia University dataset parameter l on Classification accuracy
Figure BDA0002919900700000113
Figure BDA0002919900700000121
TABLE 9 influence of Salinas dataset parameter l on Classification accuracy
Figure BDA0002919900700000122
TABLE 10 influence of Botswana dataset parameter l on Classification accuracy
Figure BDA0002919900700000123
As shown in fig. 8, the data shows the effect of different hidden layer neuron numbers on the classification accuracy. It can be seen that, for the salanas data set and the Botswana data set, when the selection of the number of neurons in the hidden layer is low, it can be seen that the classification accuracy is not affected little as shown in the figure, and when the number of neurons is increased, it can be seen that the classification accuracy of the three data sets all tend to an ideal value. On the Pavia University dataset, the classification accuracy steadily floated around 94% as the number of neurons increased, and when the number of neurons reached 50, the classification accuracy reached a peak of 94.71%, which subsequently tended to stabilize. On the salanas dataset, when the number of neurons was 10, the overall accuracy was not ideal, and when the number of neurons increased to 20 and above, the overall accuracy stabilized at around 98%, and then tended to stabilize. For the Botswana data set, when the number of neurons in the hidden layer is gradually increased from 10, the classification precision is increased from eighty to ninety, and finally stabilizes to about 92%, and when the number of neurons reaches 50, the classification precision reaches a peak value of 92.69%. It can be seen through analysis that setting a reasonable number of neurons in the hidden layer also has a large influence on the overall accuracy.
In order to further verify the effectiveness of the method, three datasets, namely, Pavia University, Salinas and Botswana, are adopted for verification, and three groups of comparative experiments are adopted for comparing the method with some closely related hyperspectral classification methods. The experimental data comprise the average value and standard deviation of 10 experimental results, and OA, AA and Kappa are used as classification precision evaluation indexes.
In the Pavia University dataset, 200 marked pixels are randomly selected from each type of ground object as training samples, 500 marked pixels are randomly selected as test samples, and the total number of the training samples is 1800. The KNN classification algorithm only uses spectral information for classification, the neighbor number is set to be 1, the SVM classification algorithm is realized by a libsvmP update open interface provided by Pablo Quesada Barriuso, the penalty coefficient parameter C value of a Support Vector Machine (SVM) is set to be 128, and the kernel width sigma value of a Gaussian radial basis kernel function is set to be 0.125. The DCNN employs a batch normalization layer optimization training process and uniformly sets the batch gradient descent sample size to 16. The method provided by the invention sets the dimensionality of the principal component of the spectral feature obtained by the dimensionality reduction processing of the spatial feature to be 15, the number of the neurons in the hidden layer to be 30, and the learning rate to be 0.01. By comparison, the method provided by the invention is obviously superior to a nearest neighbor classifier and a support vector machine, has almost the same difference with a deep network model with a multi-scale filter, and respectively achieves 93.67%, 93.90% and 92.88% of OA, AA and Kappa. Table 11 shows that the method of the present invention is compared with other algorithms from three aspects of OA, AA, and Kappa, and compared with the conventional classifier KNN and SVM, OA, AA, and Kappa are significantly improved, and the classification accuracy of most ground feature classes is also relatively improved by a few, which proves the feature extraction capability and the feature judgment capability of the proposed model, and compared with the deep network model, the overall accuracy is slightly lower than DCNN 0.63%, the average accuracy is improved by 4.48%, and the Kappa coefficient is improved by 0.48%.
TABLE 11 Classification accuracy (%) for the Pavia University dataset under different methods
Figure BDA0002919900700000131
In the Salinas dataset, 200 marked pixels are randomly selected from each type of ground object as training samples, 500 marked pixels are randomly selected as testing samples, the experimental results are the average value of the ten experimental results, and the classification precision of the Salinas dataset by different methods is shown in Table 12. Similarly, KNN and DCNN adopt the same preprocessing and parameter setting as the Pavia University data set, the signal-to-noise ratio in the SVM is set to 50 decibels, the principal component dimension of the spectral feature obtained by PCA dimensionality reduction is set to 20 dimensions, the number of neurons in the hidden layer is set to 40, the learning rate is set to 0.001, the model provided at this time achieves the optimal classification effect, OA, AA and Kappa respectively achieve 98.09%, 98.12% and 97.96%, compared with the traditional classifiers KNN, SVM and DCNN, the classification method has obvious improvement, the judgment capability of the ground objects is improved for the Vinyard-untrained classes with more noise, the classification effects of KNN, SVM and DCNN are not ideal, the overall classification accuracy is 53.64%, 64.20% and 74.50%, the classification accuracy of the method provided by combining the spectral feature and the spatial feature is improved, the classification accuracy of the Vinyard-untrained classes achieves 90.18%, as can be seen from the table, the classification effect of the invention for the whole types of the ground objects reaches more than 90%, moreover, the standard deviation can also be found to be very small, which indicates that the classification effect is very stable.
TABLE 12 Salinas data set Classification accuracy (%) -under different methods
Figure BDA0002919900700000141
In the Botswana data set, in view of the quantity of each ground feature in the data set, the sample quantities of Short mopane and Exposed soil are less than 200, therefore, 90% of each type in the Botswana data set is randomly selected as a training sample, the rest is taken as a test sample, the experimental result is also taken as an average value of ten experimental results, and the classification accuracies of different methods of the Botswana data set are shown in Table 13, in the method provided by the invention, the spectral feature principal component dimension obtained by PCA processing is set to be 15-dimensional, the number of hidden layer neurons is set to be 50, the learning rate is set to be 0.010, the best classification effect can be obtained, and the classification accuracies of three aspects of OA, AA and Kappa reach 92.97%, 94.25% and 92.47% respectively, as can be seen from the table, compared with the traditional support vector machine classifier, the classification accuracies of the three aspects of OA, AA and the classification accuracy of the KNN classifier and DCNN classifier with different preprocessing and parameter setting are slightly improved, but the classification effect of the classification method provided by the invention is still better than that, according to this table, class 5Reeds1 and class 6Riparian are misclassified because they are mixed spatial distributions on the ground, and in addition, class 9Acacia wood, class 10Acacia shrub and class 11Acacia grass are similarly classified with less than 90% precision, because the spectral behavior of these classes is very similar, resulting in easy misclassification.
TABLE 13 Botswana data set Classification accuracy (%) -under different methods
Figure BDA0002919900700000151
The invention provides a classification method based on combination of spatial features, spectral features and a BP neural network model, which is characterized in that PCA (principal component analysis) is used for dimensionality reduction to obtain the spectral features of a hyperspectral image, an LBP (local binary pattern) algorithm is used for obtaining the spatial features of the hyperspectral image, the obtained spectral features and the spatial features are serially fused to obtain a feature vector of the whole hyperspectral data, the fused hyperspectral feature vector is input into the BP neural network model for training and classification, classification performance is verified on three data sets of Pavia University, Salinas and Botswana, the problems of limited sample size and large data redundancy of the hyperspectral data are solved, and compared with classification effects in a comparison algorithm and a reference document, the overall precision (OA), the average precision (AA) and the Kappa coefficient are improved to different degrees. The method disclosed by the invention is mainly characterized in that spectral characteristics and spatial characteristics are combined, and in subsequent research, different types of characteristics such as gray level co-occurrence matrixes, color shapes and the like can be continuously added, so that the judgment capability of the characteristics is further improved, and the classification accuracy is further improved.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (6)

1. The hyperspectral image classification method based on the spatial spectral feature and the BP neural network is characterized by comprising the following steps of:
step 1, reading a hyperspectral image, performing dimensionality reduction on the read hyperspectral image by adopting a Principal Component Analysis (PCA) method to obtain a plurality of principal components with the largest variance contribution rate, using the principal components as spectral features of the hyperspectral image, and generating corresponding spectral feature vectors;
step 2, extracting spatial texture features of the hyperspectral images of each wave band by adopting an LBP local binary algorithm to obtain an LBP texture feature data set, then performing dimensionality reduction processing on the data set by adopting a PCA principal component analysis method to obtain a plurality of principal components with the largest variance contribution rate, and generating corresponding spatial feature vectors as the spatial features of the hyperspectral images;
step 3, fusing the obtained spectral feature vector and the obtained spatial feature vector in a vector superposition mode to generate a space-spectrum feature matrix;
and 4, inputting the generated space-spectrum feature matrix into a BP neural network for training, and performing hyperspectral ground object classification.
2. The hyperspectral image classification method based on the spatio-spectral feature and the BP neural network according to claim 1, wherein the method for fusing the spectral feature vector and the spatial feature vector in the step 3 comprises the following steps: the spatial feature vector is serially added at the end of the spectral feature vector.
3. The hyperspectral image classification method based on the spatio-spectral feature and the BP neural network according to claim 1, wherein the step 1 specifically comprises:
for the hyperspectral image data with dimension L multiplied by H multiplied by N, L and H are respectively the width and height of the hyperspectral image, N is the dimension of the hyperspectral image, namely the number of wave bands, and X is equal to [ X ]1,x2,…,xi,…,xD]Representing a hyperspectral image, where D ═ LxH, xiThe vector is an N-dimensional vector and consists of pixel values of N wave bands at the same position; the principal component analysis of image X was performed as follows:
substep 10, calculating a mean vector μ and a covariance matrix Σ of the hyperspectral image:
Figure FDA0002919900690000011
Figure FDA0002919900690000021
wherein [ mu ] is12,...,μD],Ij(i) Representing the pixel value of the ith pixel on the jth wave band;
substep 11, solving eigenvalue λ and eigenvector T of covariance matrix Σ:
(λI-Σ)T=0
where I is the identity matrix, let λ12,...,λNIs the characteristic root of the covariance matrix, and λ1≥λ2≥...≥λNThe corresponding feature vector is T1,T2,...,TNObtaining an orthogonal transformation matrix:
W=[T1,T2,...,TN]
the orthogonal transformation matrix satisfies:
WWT=WTW=I
substep 12, performing hyperspectral image linear transformation:
Y=WTX
and Y is a transformed image matrix, and several principal components arranged in the front of the image matrix, namely several principal components with the largest variance contribution rate, are used as the spectral characteristics of the hyperspectral image.
4. The hyperspectral image classification method based on the spatio-spectral features and the BP neural network according to claim 1, wherein the method for training the BP neural network in the step 4 comprises the following steps:
substep 20, network initialization; determining the number o of nodes of the input layer, the number l of nodes of the hidden layer and the number m of nodes of the output layer of the network according to the input and output sequence (P, Q) of the system, and initializing the connection weight w among neurons of the input layer, the hidden layer and the output layerrsAnd wstInitializing a hidden layer threshold a and an output layer threshold b, and setting a learning rate and a neuron excitation function;
substep 21, hidden layer output calculation; connecting the input layer and the hidden layer according to the input variable P to obtain the weight wrsAnd a hidden layer threshold a, calculating a hidden layer output H:
Figure FDA0002919900690000022
in the formula, f is a hidden layer excitation function;
substep 22, outputting layer calculation; according to the hidden layer output H, connecting the weight wstAnd a threshold b, calculating the prediction output O of the BP neural network:
Figure FDA0002919900690000031
substep 23, error calculation; calculating a network prediction error e according to the network prediction output O and the expected output C:
et=Ct-Ot
substep 24, updating the weight value; updating the connection weight w according to the network prediction error ersAnd wst
Figure FDA0002919900690000032
wst=wst+ηHset
In the formula, eta is the learning rate;
substep 25, updating the threshold value; updating a threshold value a, b according to the network prediction error e:
Figure FDA0002919900690000033
bt=bt+et
and substep 26, judging whether the algorithm iteration is finished, and returning to substep 21 if the algorithm iteration is not finished.
5. The hyperspectral image classification method based on the spatio-spectral features and the BP neural network according to claim 1, wherein after the hyperspectral terrain classification is completed, the precision evaluation is further performed.
6. The hyperspectral image classification method based on spatio-spectral features and BP neural network according to claim 5, wherein in the precision evaluation, overall precision OA, average precision AA and Kappa coefficients calculated based on a confusion matrix are used as evaluation indexes.
CN202110113912.XA 2021-01-27 2021-01-27 Hyperspectral image classification method based on spatial spectral feature and BP neural network Pending CN112784907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110113912.XA CN112784907A (en) 2021-01-27 2021-01-27 Hyperspectral image classification method based on spatial spectral feature and BP neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110113912.XA CN112784907A (en) 2021-01-27 2021-01-27 Hyperspectral image classification method based on spatial spectral feature and BP neural network

Publications (1)

Publication Number Publication Date
CN112784907A true CN112784907A (en) 2021-05-11

Family

ID=75759199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110113912.XA Pending CN112784907A (en) 2021-01-27 2021-01-27 Hyperspectral image classification method based on spatial spectral feature and BP neural network

Country Status (1)

Country Link
CN (1) CN112784907A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113436090A (en) * 2021-06-16 2021-09-24 中国电子科技集团公司第五十四研究所 Remote sensing image spectrum and texture feature fusion extraction method
CN114663767A (en) * 2022-04-03 2022-06-24 国交空间信息技术(北京)有限公司 Remote sensing image sand-buried road section identification method
CN117789038A (en) * 2024-02-26 2024-03-29 聊城莱柯智能机器人有限公司 Training method of data processing and recognition model based on machine learning

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111081400A (en) * 2019-11-25 2020-04-28 西安交通大学 Machine learning-based rod bundle sub-channel thermal hydraulic characteristic prediction method
CN111881953A (en) * 2020-07-14 2020-11-03 安徽大学 Remote sensing hyperspectral image classification method based on local binary pattern and KNN classifier

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111081400A (en) * 2019-11-25 2020-04-28 西安交通大学 Machine learning-based rod bundle sub-channel thermal hydraulic characteristic prediction method
CN111881953A (en) * 2020-07-14 2020-11-03 安徽大学 Remote sensing hyperspectral image classification method based on local binary pattern and KNN classifier

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张明芝 等主编: "《实用医学统计学与SAS应用》", 30 September 2015, 苏州大学出版社 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113436090A (en) * 2021-06-16 2021-09-24 中国电子科技集团公司第五十四研究所 Remote sensing image spectrum and texture feature fusion extraction method
CN114663767A (en) * 2022-04-03 2022-06-24 国交空间信息技术(北京)有限公司 Remote sensing image sand-buried road section identification method
CN117789038A (en) * 2024-02-26 2024-03-29 聊城莱柯智能机器人有限公司 Training method of data processing and recognition model based on machine learning
CN117789038B (en) * 2024-02-26 2024-05-10 聊城莱柯智能机器人有限公司 Training method of data processing and recognition model based on machine learning

Similar Documents

Publication Publication Date Title
CN112232280B (en) Hyperspectral image classification method based on self-encoder and 3D depth residual error network
Zhang et al. Spectral partitioning residual network with spatial attention mechanism for hyperspectral image classification
CN111881953B (en) Remote sensing hyperspectral image classification method based on local binary pattern and KNN classifier
CN109389080B (en) Hyperspectral image classification method based on semi-supervised WGAN-GP
CN112784907A (en) Hyperspectral image classification method based on spatial spectral feature and BP neural network
CN109598306B (en) Hyperspectral image classification method based on SRCM and convolutional neural network
CN110472682B (en) Hyperspectral remote sensing image classification method considering spatial and local characteristics
CN107145836B (en) Hyperspectral image classification method based on stacked boundary identification self-encoder
CN112101271A (en) Hyperspectral remote sensing image classification method and device
CN110458192B (en) Hyperspectral remote sensing image classification method and system based on visual saliency
Li et al. Multidimensional local binary pattern for hyperspectral image classification
Sidike et al. Progressively Expanded Neural Network (PEN Net) for hyperspectral image classification: A new neural network paradigm for remote sensing image analysis
Ghasrodashti et al. Hyperspectral image classification using an extended Auto-Encoder method
Feng et al. Dual-graph convolutional network based on band attention and sparse constraint for hyperspectral band selection
CN115512162A (en) Terrain classification method based on attention twin network and multi-mode fusion features
CN115527056A (en) Hyperspectral image classification method based on dual-hybrid convolution generation countermeasure network
CN115564996A (en) Hyperspectral remote sensing image classification method based on attention union network
Dalal et al. IDA: Improving distribution analysis for reducing data complexity and dimensionality in hyperspectral images
CN113052130B (en) Hyperspectral image classification method based on depth residual error network and edge protection filtering
Xue et al. Incremental dictionary learning-driven tensor low-rank and sparse representation for hyperspectral image classification
CN112115961B (en) Hyperspectral remote sensing image classification method based on sparse graph regularization
Song et al. Using dual-channel CNN to classify hyperspectral image based on spatial-spectral information
Pal Margin-based feature selection for hyperspectral data
Shi et al. A complementary spectral-spatial method for hyperspectral image classification
Li et al. Enhanced Leaf Area Index Estimation With CROP-DualGAN Network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination