# Spectral-Spatial Hyperspectral Image Classification Based on Homogeneous Minimum Spanning Forest

Authors: F. Poorahangaryan; H. Ghassemian
Journal: Mathematical Problems in Engineering
 (2020)

---

## Abstract

The combination of spectral and spatial information is known as a suitable way to improve the accuracy of hyperspectral image classification. In this paper, we propose a spectral-spatial hyperspectral image classification approach composed of the following stages. Initially, the support vector machine (SVM) is applied to obtain the initial classification map. Then, we present a new index called the homogeneity order and, using that withK-nearest neighbors, we select some pixels in feature space. The extracted pixels are considered as markers for Minimum Spanning Forest (MSF) construction. The class assignment to the markers is done using the initial classification map results. In the final stage, MSF is applied to these markers, and a spectral-spatial classification map is obtained. Experiments performed on several real hyperspectral images demonstrate that the classification accuracies obtained by the proposed scheme are improved when compared to MSF-based spectral-spatial classification approaches.


---

## Body

## 1. Introduction

Hyperspectral imagery (HIS) records reflectance values of the electromagnetic spectra in more than hundred spectral bands for each spatial position in the image. Although this valuable spectral information increases the ability to classify materials, due to the high dimensionality of the pixels, more complicated algorithms are required for hyperspectral image analysis. Several scholars investigated on hyperspectral image dimension reduction [1, 2].Classification can be defined as assigning a unique label to each pixel in the image such that pixels with similar spectral signatures belong to the same class. In the first beginning, many pixel-wise classification techniques [3] were introduced to classify each pixel in the image independently based on only its spectral information. To further increase classification accuracies, many algorithms were designed based on a combination of spectral and spatial information [4–6]. It means that information obtained from the neighborhood of pixels and their spectrums is considered in the classification process.Another approach for the integration of spatial information into the spectral-spatial classification process is based on image segmentation. Numerous segmentation models have been successfully performed, including watershed [7], partitional clustering [8], hierarchical segmentation [9], and multilevel segmentation [10]. These approaches divide the image into homogeneous regions based on a homogeneity measure. The results of these studies indicate the considerable improvement of classification accuracies. However, the automatic segmentation of hyperspectral images is a challenging task. Thus, the marker-controlled segmentation technique was suggested to solve the mentioned problem [9, 11]. Tarabalka et al. [11] proposed a marker-controlled segmentation for automated selection of a single hierarchical segmentation level. In that, at least one pixel for each spatial object is selected, which is called marker. Then, regions are grown from the markers. In the other work [9], markers are defined from probabilistic support vector machine (SVM) results, and then Minimum Spanning Forest (MSF) is constructed.Although the results of the experiments of two mentioned studies indicate that the marker-controlled segmentation has good performance in hyperspectral image classification, the markers were selected based on the performance of SVM classifiers. If another pixel-wise classifier is used, it may lead to different markers. Therefore, the classification result will not be the certainty. Moreover, the different parameter settings in the same classifiers may afford the described problem [12]. Recently, the spectral-spatial classifier is proposed based on algebraic multigrid (AMG) method and hierarchical segmentation (HSEG) algorithm [12]. In this scheme, the AMG method is performed on the hyperspectral image, and a multigrid structure is generated. Then, the vertices of the obtained structure are regarded as seeds for the HSEG algorithm. In this step, the results of the segmentation and pixel-wise classification map are combined via applying the majority vote decision rule. Finally, the optimal grid level is selected, and a final classification map is obtained. Although this approach increases the classification accuracy, the selection of the optimal grid level may be the main challenge. The use of multilevel spanning forest has also been considered in recent research [13, 14]. In this approach, the combination of multiscale filters and MSF has been used. Although these studies have achieved a high degree of accuracy in classification, they used random markers to create MSFs. Some researchers also used this strategy to create MSF [15]. Although the use of random markers reduces the complexity of the method, if one of the areas of the image does not have a candidate in the markers, it will remove the area in the final classification map. To overcome this problem, scholars have used multilevel techniques. However, these approaches need a huge consuming time.In this paper, a spectral-spatial hyperspectral image classification method based on MSF is presented, which used a new strategy for the selection of markers. The main property of our method is that the selection of the markers does not depend on the pixel-wise classification results. At first, we present a new index called the homogeneity order to extract the pixels. Then the results are considered as the input toK-nearest neighbor (KNN) that searches in feature space. The obtained pixels are regarded as markers for the MSF algorithm, and the spatial-spectral classification map is produced. The remainder of the paper is organized as follows. Section 2 describes the proposed method for hyperspectral image classification. Experimental results and the related discussions are presented in Section 3. Section 4 gives the conclusions.


## 2. Methodology

Figure1 presents the general framework of the proposed method.Figure 1
The general framework of the proposed method.In Figure1, the input of our method is a hyperspectral image with the b-spectral band and the size of m×n, which is considered as the matrix of order m×n×b. The first classification process is done on the image using SVM. Meanwhile, the local homogeneous pixels are identified. This part provides a step-by-step explanation of how local homogeneous pixels are extracted in the next step. KNN is performed in order to select the pixels that are in the local pixel neighborhood in the feature space. The results of SVM classification are used to allocate a class to each marker. Such pixels are considered as spectral-spatial markers for the MSF algorithm, and, finally, the spatial-spectral classification is constructed.


### 2.1. Extracting Local Homogeneous Pixels

In order to determine the local homogeneous pixels, homogeneity index of the image pixels is measured.NPi represents the set of local spatial neighbors for central pixel xi with coordinate pi,qi and it is obtained from the following equation:(1)NPi=x≜p,q|p∈pi−a,pi+a,q∈qi−a,qi+a,where a=w−1/2 and w is an odd number that determines the width of the neighborhood window. Local neighboring pixels are presented as xi1,xi2,…,xis, and s signifies the maximum number of neighboring pixels. For example, in an 8-scale neighborhood shown in Figure 2, s = 8.Figure 2
Representation of 8-scale neighborhood (yellow pixels) around the central pixel (green-blue pixel).The homogeneity index of pixelxi in each b-spectral band, hib, is obtained as follows:(2)hib=1s∑k=1sxi−xikTxi−xik.The homogeneity index is the average of the spectral distance betweenNPi pixels and central pixel xi. As the distance decreases, the central pixels tends to move into a more homogeneous region. In order to determine the homogeneity order, the matrix H is constructed as follows:(3)H=sorth11⋯h1B⋮⋱⋮hN1⋯hNB,where N = m×n signifies the total number of image pixels and B signifies the number of the spectral bands. Matrix A is a subset of matrix H whose number of rows can be obtained as follows: (4)M=0.1×TH×N,where 1≤TH≤10.Then, the Pixel Homogeneity Order (PHO) is determined by the number of occurrences of each pixel in MatrixA. After this step, Nh pixels with a higher PHO are selected.


### 2.2. Determination ofK-Neighbors in Feature Space

The image is mapped into feature space. Pixels having the minimum distance from the one extracted in the previous step are selected. This method is based on the fact that neighboring pixel in the feature space is more likely to belong to the same class. Each homogeneous pixel obtained from the previous step is considered as the central pixel, and other pixels are selected using theK-nearest neighbor in the feature space. Figure 3 is a simple description of neighbor pixels selection in the feature space. In this figure, the green-blue pixel is a homogeneous pixel with five nearest neighbors in the feature space shown as the yellow pixel.Figure 3
The neighboring pixels (yellow pixels) in the feature space with the central pixel (green pixel).


### 2.3. Spectral-Spatial Marker Generation

IfNh represents the number of homogeneous pixels, the number of final spectral-spatial markers can be obtained as(5)Nm=Nh×K+1,where K is the number of neighborhoods obtained by KNN method. The results of classification obtained from SVM help allocate a class to extracted markers.Ifyiji=1,…,s,j=1,…,Nm presents the class of ith local neighbor of j marker, the class of the marker ycj is obtained by the following equation:(6)ycj=yij|frequency=F,where F=maxfrequencyyij.All the obtained pixels are considered as markers in MSF algorithm. For more details of MSF construction, see [7].


## 2.1. Extracting Local Homogeneous Pixels

In order to determine the local homogeneous pixels, homogeneity index of the image pixels is measured.NPi represents the set of local spatial neighbors for central pixel xi with coordinate pi,qi and it is obtained from the following equation:(1)NPi=x≜p,q|p∈pi−a,pi+a,q∈qi−a,qi+a,where a=w−1/2 and w is an odd number that determines the width of the neighborhood window. Local neighboring pixels are presented as xi1,xi2,…,xis, and s signifies the maximum number of neighboring pixels. For example, in an 8-scale neighborhood shown in Figure 2, s = 8.Figure 2
Representation of 8-scale neighborhood (yellow pixels) around the central pixel (green-blue pixel).The homogeneity index of pixelxi in each b-spectral band, hib, is obtained as follows:(2)hib=1s∑k=1sxi−xikTxi−xik.The homogeneity index is the average of the spectral distance betweenNPi pixels and central pixel xi. As the distance decreases, the central pixels tends to move into a more homogeneous region. In order to determine the homogeneity order, the matrix H is constructed as follows:(3)H=sorth11⋯h1B⋮⋱⋮hN1⋯hNB,where N = m×n signifies the total number of image pixels and B signifies the number of the spectral bands. Matrix A is a subset of matrix H whose number of rows can be obtained as follows: (4)M=0.1×TH×N,where 1≤TH≤10.Then, the Pixel Homogeneity Order (PHO) is determined by the number of occurrences of each pixel in MatrixA. After this step, Nh pixels with a higher PHO are selected.


## 2.2. Determination ofK-Neighbors in Feature Space

The image is mapped into feature space. Pixels having the minimum distance from the one extracted in the previous step are selected. This method is based on the fact that neighboring pixel in the feature space is more likely to belong to the same class. Each homogeneous pixel obtained from the previous step is considered as the central pixel, and other pixels are selected using theK-nearest neighbor in the feature space. Figure 3 is a simple description of neighbor pixels selection in the feature space. In this figure, the green-blue pixel is a homogeneous pixel with five nearest neighbors in the feature space shown as the yellow pixel.Figure 3
The neighboring pixels (yellow pixels) in the feature space with the central pixel (green pixel).


## 2.3. Spectral-Spatial Marker Generation

IfNh represents the number of homogeneous pixels, the number of final spectral-spatial markers can be obtained as(5)Nm=Nh×K+1,where K is the number of neighborhoods obtained by KNN method. The results of classification obtained from SVM help allocate a class to extracted markers.Ifyiji=1,…,s,j=1,…,Nm presents the class of ith local neighbor of j marker, the class of the marker ycj is obtained by the following equation:(6)ycj=yij|frequency=F,where F=maxfrequencyyij.All the obtained pixels are considered as markers in MSF algorithm. For more details of MSF construction, see [7].


## 3. Results of the Experiment and Discussion

Three hyperspectral benchmark images have been used: Salinas, Indian Pines, and University of Pavia (PaviaU). We choose a subset of the Salinas dataset called SalinasA, which comprises 83×86 pixels located in the591−678×158−240 of Salinas. Table 1 explains the major features of each dataset including the sensor, image size, the number of spectral bands, wavelength, spatial resolution, and the number of classes.Table 1
The characteristics of the datasets.
Hyperspectral imageSensorSizeNumberWavelength range (μm)Spatial resolution (m)Number of classesIndian PinesAVIRIS145 × 1452000.4–2.52016PaviaUROSIS610 × 3401030.43–0.861.39SalinasAAVIRIS83 × 862040.4–2.53.76In order to evaluate the proposed method, three indexes, overall accuracy (OA), average accuracy (AA) and kappa coefficient, have been used. AA is the mean of the percentage of correctly classified pixels for each class. The kappa coefficient gives the percentage of correctly classified pixels corrected by the number of agreements that would be expected purely by chance. All runs are implemented in MATLAB R2014b with a laptop with 2.40 GHz central processing unit (Intel(R) Core(TM) i7-5500), 8 GB memory, and Windows 7 operating system. The number of training samples of each data is presented in Tables2–4. In order to measure homogeneity index, an 8-scale neighborhood is used.Table 2
Information classes, number of training samples, and classification accuracy for SalinasA.
No. of samplesNo. of training samplesSVMSVM-MSFMC-MSFRD-MSFMSWMF-MSFMSMMSFProposed MethodsHMSFHKNN-MSF-MVF–HKNN-MSF-MV MSFBrocoli_green_weeds_1391699.4910010010098.47100100100100Corn_senesced_green_weeds1343697.6995.992.0393.2299.4898.9899.9399.799.48Lettuce_romaine_4wk616693.6797.7394.9795.6298.8698.7890.4290.58100Lettuce_romaine_5wk1525699.9310010010099.2810099.8100100Lettuce_romaine_6wk647699.1199.5510010098.22100100100100Lettuce_romaine_7wk799696.6210010010099.1210099.2599.7599.87AA (%)——97.7598.8697.8398.1498.999.6298.2398.3399.89OA (%)——96.6998.6597.4297.7997.6399.4898.7198.899.85Kappa coefficient (%)——96.3398.0496.8297.3697.1199.498.3898.599.81Table 3
Information classes, number of training samples, and classification accuracy for Indian Pines.
No. of samplesNo. of training samplesSVMMC-MSFRD-MSFMSWMF-MSFMSMMSFProposed MethodsHMSFHKNN-MSF-MVF–HKNN—MSF-MVAlfalfa461595.6594.8797.8397.8310097.83100100Corn-notill14285064.8575.1378.0693.7786.5562.1888.1796.5Corn-mintill8305061.5774.6286.9997.1190.7267.2379.7694.82Corn2375086.0892.3991.8596.6210096.296.2100Grass-pasture4835092.5598.2198.798.3494.6288.895.2497.52Grass-trees7305087.8193.5192.1798.4997.9598.4998.999.86Grass-p-mowed281596.4396.4396.4396.4310010096.4396.43Hay-windrowed4785099.1699.5499.7799.7910010099.7599.79Oats201510010010010010010095100Soybean-notill9725066.4681.6888.1494.2488.7974.5984.190.53Soybean-mintill24555047.9464.1468.8285.2485.3860.3363.183.83Soybean-clean5935071.585.9990.7896.4692.2285.586.6898.48Wheat2055099.0299.3899.3899.5110099.0299.599.51Woods12655083.3288.3888.8598.7497.1588.0693.3697.94B-G-T-drives3865071.7682.1281.52.98.798.9696.1191.4598.19S-steel-towers935091.497.7897.7898.9210098.92100100AA (%)——82.2189.0691.0696.9395.6488.3391.7397.08OA (%)——69.7982.1487.1793.1591.4576.9484.0393.76Kappa coefficient——66.2780.5685.7890.3274.282.0592.92Table 4
Information classes, number of training samples, and classification accuracy for PaviaU.
No. of samplesNo. of training samplesSVMSVM-MSFMC-MSFRD-MSFMSWMF-MSFMSMMSFProposed MethodsHMSFHKNN-MSF-MVF–HKNN-MSF-MVAsphalt663154882.1793.1687.193.8597.4299.29304593.1697.3Meadows1864954087.2597.796.6798.198.5399.2399.3899.45100Gravel209939281.2392.1578.3793.7991.3395.4397.2898.298.5Trees306452493.2191.2498.8794.3894.6896.2877.5888.8498.2Metal sheets134526599.7896.396.896.998.3610099.7899.78100Bare soil502953291.0599.9196.498.598.3599.899.5299.9199.2Bitumen133037589.498.5798.8798.999.2510099.2597.898.87Bricks368251485.1792.7890.1091.596.2898.1882.6287.696.86Shadows94723199.8996.2398.6297.3696.697.3799.8999.89100AA (%)——89.995.3393.5295.9296.7598.3694.3796.0798.77OA (%)87.696.679597.0797.4598.895.6597.2399.12Kappa coefficient (%)85.3394.1992.8396.0596.6498.4194.2196.3198.92


### 3.1. Analyzing the Effectiveness of Parameters on the Proposed Method Performance

Three parameters “Nh”, “TH,” and “K” have impact on the results of the method. Classification accuracy is evaluated by changing the number of homogeneous pixels. It helps to examine the impact of parameter “TH” on the method. The number of homogeneous pixels changes from 200 to 1800 with Step 200 in SalinasA and from 500 to 6000 with Step 500 in Indian Pines. It also changes from 5000 to 40000 with Step 5000 in PaviaU. Figure 4 represents the evaluation of the three data.Figure 4
Evolution of the average accuracy (AA) against two parameters (Nh and TH). (a) SalinasA; (b) Indian Pines; (c) PaviaU.
(a)(b)(c)It has been observed that the optimal amounts of parameter “TH” in SalinasA, Indian Pines, and PaviaU are 3, 4, and 4, respectively. The optimal amount of parameter “TH” is determined in such a way that the difference of the obtained AA caused by changes in the number of the markers is smaller in the optimal value “TH” compared to other values. It is observed, after careful examination of the images, that mixed pixels are less likely to be found in images with high spatial resolution, for example, SalinasA and PaviaU. So there is not too much difference in the homogeneity order of the pixels and to achieve a more accurate homogeneity order, matrix A should be bigger compared to the situation where the image has a low spatial resolution because, in low spatial resolution images, pixel homogeneity indexes are not close in different bands. Having information about the spatial resolution of the image, we can fix the parameter “TH” in the following way:(i)
TH = 3, if there is a low spatial resolution image(ii)
TH = 4, if there is a high spatial resolution imageWith obtained values for parameter “TH” being considered, theK-nearest neighbors around homogeneous pixels are selected. The classification accuracy of the proposed method is evaluated by changing the parameter “K” from 1 to 8, which happens when the number of homogeneous pixels (Nh) changes. Figure 5 shows this evaluation.Figure 5
Analysis of the influence of the parameterK. (a) SalinasA; (b) Indian Pines; (c) PaviaU.
(a)(b)(c)In order to determine the optimal values ofK and Nh, the best classification accuracy value has been taken into account. It is(7)Nh,Kopt=argmaxNh,kAANh,kThe results show that the optimal values of “K” for the three datasets, SalinasA, Indian Pines, and PaviaU, are 5, 2, and 2, respectively. Besides, the optimal values of Nh for the mentioned datasets are 600, 1000, and 30000, respectively. The optimal amount of the parameter Nh in the two datasets SalinasA and Indian Pines is about 8% of the total number of image pixels. However, this amount in dataset PaviaU is more than the one stated before (about 15%). Now, we will discuss the reason for the difference: PaviaU is on urban data which contains a lot of small regions. Thus, the number of markers should be high enough to maximize the likelihood of marker selection in all regions. Otherwise, out-of-marker regions are more likely to be eliminated. In the three datasets, the classification accuracy will reduce if the number of markers is fewer than the optimal value because many more numbers of image pixels are considered as markers.We setK = 2 as the default parameter which gives the best performance in these experiments. Although the optimal value for SalinasA is achieved at 5, the difference between AA at k = 5 and k = 2 is less than 0.1%. So, we can set K = 2.


### 3.2. Results of Classification and Comparison with Some Existing Methods

Tables2–4 show information about classes, the number of class samples, the number of training samples, and the results of classification for Salinas A, Indian Pines, and PaviaU, respectively. Our method is named as HKNN-MSF-MV. The results of our method are given in this section. Besides, other aspects of this method are examined and given as follows:(i)
HMSF : Proposed method when the KNN step is ignored.(ii)
F–HKNN-MSF-MV : In this case, WMF is used to smooth images homogeneity considering optimal value for the parameters; the method (HKNN-MSF-MV) is performed on the images extracted from the filtering stage. In this paper, the WMF parameters are set according to previous research [14].Figure6 indicates grand trust map, classification map obtained from SVM, and our proposed methods for SalinasA. It is clear that, by the visual comparison of the images, the proposed method improves the SVM classification. Furthermore, the filtering stage helps increase the homogeneity of the pixel in such a way that the image obtained from this method has less noise compared to other methods. In addition, in this part, the method has been compared with several hyperspectral image classification methods including (1) classification by applying grown MSF on the markers obtained from probable SVM (SVM-MSF) [9], (2) classification by constructing on MSF on the markers obtained from multiclassifiers results (MC-MSF) [9], (3) classification by constructing MSF on random markers (RD-MSF) [15], (4) classification by combination of multiscale filter and MSF (MSWMF-MSF) [14], and (5) multiscale modified MSF (MSMMSF) [13]. It is worth mentioning that training samples of all the methods should be equal in terms of number and position in order to provide an accurate evaluation. Table 2 shows the results obtained from various methods for SalinasA.Figure 6
SalinasA image. (a) Ground truth data; (b) pixel-wise classification map using SVM; classification map obtained by (c) HMSF, (d) HKNN-MSF-MV, and (e) F–HKNN-MSF-MV.
(a)(b)(c)(d)(e)Table2 indicates that the proposed methods can effectively enhance the OA and Kappa of SVM. However, the obtained AA of the proposed method without the filtering step is less than some of the MSF-based methods (SVM-MSF, MSWMF-MSF, and MSMMSF). This difference is related to the spectral within-class variability of the Lettuce_romaine_4wk class. In Figure 7, the spectral values of fourteen samples of some classes are presented in various spectral bands. This figure illustrates the within-class variability of Lettuce_romaine_4wk class, apparently. So, the homogeneity index for most of the pixels can be high, and the number of representatives of this class in the marker map can be reduced. When the number of class markers reduces, the class is more likely to be misclassified. This problem is solved by using F–HKNN-MSF-MV. In this method, due to the spatial filtering, the adjacent pixel consistency and therefore the homogeneity of the areas increase.Figure 7
The display of the within-class variability of some classes for SalinasA. (a) Lettuce_romaine_4wk; (b) Lettuce_romaine_5wk; (c) Lettuce_romaine_7wk; (d) Brocoli_green_weeds_1.
(a)(b)(c)(d)It is clear that the accuracy of the individual classification for almost all of the classes is also improved by the proposed F–HKNN-MSF-MV method. For example, the accuracy of theLettuce_romaine_4wk class has been improved from 90.58 to 100% in comparison with the HKNN-MSF-MV.Figures8 and 9 indicate grand trust map, classification map obtained from SVM, and our proposed methods for Indian Pines and PaviaU, respectively. Furthermore, the numbers of training and test samples and the accuracy of individual classification for different methods for Indian Pines and PaviaU are presented in Tables 3 and 4, respectively. We can see that the proposed method improves the OA, AA, and Kappa of SVM. Moreover, the HKNN-MSF-MV method shows the best classification performance in terms of OA, AA, and Kappa in comparison with the other MSF-based methods. However, compared with MSMMSF, it is not so efficient. The reason is edge-preservation filtering used in MSMMSF. However, the filtering-based proposed method, F–HKNN-MSF-MV, leads to a dramatic increase in the classification accuracy compared to other methods.Figure 8
Indian Pines image. (a) Ground truth data; (b) pixel-wise classification map using SVM; classification map obtained by (c) HMSF, (d) HKNN-MSF-MV, and (e) F–HKNN-MSF-MV.
(a)(b)(c)(d)(e)Figure 9
PaviaU image. (a) Ground truth data; (b) pixel-wise classification map using SVM; classification map obtained by (c) HMSF, (d) HKNN-MSF-MV, and (e) F–HKNN-MSF-MV.
(a)(b)(c)(d)(e)


## 3.1. Analyzing the Effectiveness of Parameters on the Proposed Method Performance

Three parameters “Nh”, “TH,” and “K” have impact on the results of the method. Classification accuracy is evaluated by changing the number of homogeneous pixels. It helps to examine the impact of parameter “TH” on the method. The number of homogeneous pixels changes from 200 to 1800 with Step 200 in SalinasA and from 500 to 6000 with Step 500 in Indian Pines. It also changes from 5000 to 40000 with Step 5000 in PaviaU. Figure 4 represents the evaluation of the three data.Figure 4
Evolution of the average accuracy (AA) against two parameters (Nh and TH). (a) SalinasA; (b) Indian Pines; (c) PaviaU.
(a)(b)(c)It has been observed that the optimal amounts of parameter “TH” in SalinasA, Indian Pines, and PaviaU are 3, 4, and 4, respectively. The optimal amount of parameter “TH” is determined in such a way that the difference of the obtained AA caused by changes in the number of the markers is smaller in the optimal value “TH” compared to other values. It is observed, after careful examination of the images, that mixed pixels are less likely to be found in images with high spatial resolution, for example, SalinasA and PaviaU. So there is not too much difference in the homogeneity order of the pixels and to achieve a more accurate homogeneity order, matrix A should be bigger compared to the situation where the image has a low spatial resolution because, in low spatial resolution images, pixel homogeneity indexes are not close in different bands. Having information about the spatial resolution of the image, we can fix the parameter “TH” in the following way:(i)
TH = 3, if there is a low spatial resolution image(ii)
TH = 4, if there is a high spatial resolution imageWith obtained values for parameter “TH” being considered, theK-nearest neighbors around homogeneous pixels are selected. The classification accuracy of the proposed method is evaluated by changing the parameter “K” from 1 to 8, which happens when the number of homogeneous pixels (Nh) changes. Figure 5 shows this evaluation.Figure 5
Analysis of the influence of the parameterK. (a) SalinasA; (b) Indian Pines; (c) PaviaU.
(a)(b)(c)In order to determine the optimal values ofK and Nh, the best classification accuracy value has been taken into account. It is(7)Nh,Kopt=argmaxNh,kAANh,kThe results show that the optimal values of “K” for the three datasets, SalinasA, Indian Pines, and PaviaU, are 5, 2, and 2, respectively. Besides, the optimal values of Nh for the mentioned datasets are 600, 1000, and 30000, respectively. The optimal amount of the parameter Nh in the two datasets SalinasA and Indian Pines is about 8% of the total number of image pixels. However, this amount in dataset PaviaU is more than the one stated before (about 15%). Now, we will discuss the reason for the difference: PaviaU is on urban data which contains a lot of small regions. Thus, the number of markers should be high enough to maximize the likelihood of marker selection in all regions. Otherwise, out-of-marker regions are more likely to be eliminated. In the three datasets, the classification accuracy will reduce if the number of markers is fewer than the optimal value because many more numbers of image pixels are considered as markers.We setK = 2 as the default parameter which gives the best performance in these experiments. Although the optimal value for SalinasA is achieved at 5, the difference between AA at k = 5 and k = 2 is less than 0.1%. So, we can set K = 2.


## 3.2. Results of Classification and Comparison with Some Existing Methods

Tables2–4 show information about classes, the number of class samples, the number of training samples, and the results of classification for Salinas A, Indian Pines, and PaviaU, respectively. Our method is named as HKNN-MSF-MV. The results of our method are given in this section. Besides, other aspects of this method are examined and given as follows:(i)
HMSF : Proposed method when the KNN step is ignored.(ii)
F–HKNN-MSF-MV : In this case, WMF is used to smooth images homogeneity considering optimal value for the parameters; the method (HKNN-MSF-MV) is performed on the images extracted from the filtering stage. In this paper, the WMF parameters are set according to previous research [14].Figure6 indicates grand trust map, classification map obtained from SVM, and our proposed methods for SalinasA. It is clear that, by the visual comparison of the images, the proposed method improves the SVM classification. Furthermore, the filtering stage helps increase the homogeneity of the pixel in such a way that the image obtained from this method has less noise compared to other methods. In addition, in this part, the method has been compared with several hyperspectral image classification methods including (1) classification by applying grown MSF on the markers obtained from probable SVM (SVM-MSF) [9], (2) classification by constructing on MSF on the markers obtained from multiclassifiers results (MC-MSF) [9], (3) classification by constructing MSF on random markers (RD-MSF) [15], (4) classification by combination of multiscale filter and MSF (MSWMF-MSF) [14], and (5) multiscale modified MSF (MSMMSF) [13]. It is worth mentioning that training samples of all the methods should be equal in terms of number and position in order to provide an accurate evaluation. Table 2 shows the results obtained from various methods for SalinasA.Figure 6
SalinasA image. (a) Ground truth data; (b) pixel-wise classification map using SVM; classification map obtained by (c) HMSF, (d) HKNN-MSF-MV, and (e) F–HKNN-MSF-MV.
(a)(b)(c)(d)(e)Table2 indicates that the proposed methods can effectively enhance the OA and Kappa of SVM. However, the obtained AA of the proposed method without the filtering step is less than some of the MSF-based methods (SVM-MSF, MSWMF-MSF, and MSMMSF). This difference is related to the spectral within-class variability of the Lettuce_romaine_4wk class. In Figure 7, the spectral values of fourteen samples of some classes are presented in various spectral bands. This figure illustrates the within-class variability of Lettuce_romaine_4wk class, apparently. So, the homogeneity index for most of the pixels can be high, and the number of representatives of this class in the marker map can be reduced. When the number of class markers reduces, the class is more likely to be misclassified. This problem is solved by using F–HKNN-MSF-MV. In this method, due to the spatial filtering, the adjacent pixel consistency and therefore the homogeneity of the areas increase.Figure 7
The display of the within-class variability of some classes for SalinasA. (a) Lettuce_romaine_4wk; (b) Lettuce_romaine_5wk; (c) Lettuce_romaine_7wk; (d) Brocoli_green_weeds_1.
(a)(b)(c)(d)It is clear that the accuracy of the individual classification for almost all of the classes is also improved by the proposed F–HKNN-MSF-MV method. For example, the accuracy of theLettuce_romaine_4wk class has been improved from 90.58 to 100% in comparison with the HKNN-MSF-MV.Figures8 and 9 indicate grand trust map, classification map obtained from SVM, and our proposed methods for Indian Pines and PaviaU, respectively. Furthermore, the numbers of training and test samples and the accuracy of individual classification for different methods for Indian Pines and PaviaU are presented in Tables 3 and 4, respectively. We can see that the proposed method improves the OA, AA, and Kappa of SVM. Moreover, the HKNN-MSF-MV method shows the best classification performance in terms of OA, AA, and Kappa in comparison with the other MSF-based methods. However, compared with MSMMSF, it is not so efficient. The reason is edge-preservation filtering used in MSMMSF. However, the filtering-based proposed method, F–HKNN-MSF-MV, leads to a dramatic increase in the classification accuracy compared to other methods.Figure 8
Indian Pines image. (a) Ground truth data; (b) pixel-wise classification map using SVM; classification map obtained by (c) HMSF, (d) HKNN-MSF-MV, and (e) F–HKNN-MSF-MV.
(a)(b)(c)(d)(e)Figure 9
PaviaU image. (a) Ground truth data; (b) pixel-wise classification map using SVM; classification map obtained by (c) HMSF, (d) HKNN-MSF-MV, and (e) F–HKNN-MSF-MV.
(a)(b)(c)(d)(e)


## 4. Conclusion

In this paper, a new approach is presented for spectral-spatial classification. This method introduced the homogeneity order index and applied the K-nearest neighbors in feature space for robust spectral-spatial markers extraction. The obtained markers are used in the MSF algorithm and the spatial-spectral classification map is produced. In the previous MSF-based methods, the performance of the initial classification has essential effects on the marker selection and also the final classification results. This is a challenge, but the proposed method can solve this problem. The presented method was also compared to some state-of-the-art methods. These comparisons demonstrate that the classification accuracies obtained by the proposed scheme are improved when compared to MSF-based spectral-spatial classification approaches.



---

*Source: 8884965-2020-11-12.xml*