# Introduction lassification of images is performed to segregate different class of objects present in a remotely sensed image imaged by the remote sensing sensor. Generally, Image classification is performed to classify and estimate the natural resources available within a geographical extend. One of the popular criteria of image classification is vegetation index. Through vegetation index-based classification one can obtain different types of vegetation with in an area. But vegetation index-based classification cannot yield accurate estimation of different varieties of vegetables of similar class such as rice, pulse, wheat sharing close segregated radiometric characteristics. After hyper classifying these similar type crops as well as vegetations of diverse type, hyperspectral imaging captures finer signature of different types of vegetation or natural classes within a geographical extend. But hyperspectral images suffer from high radiometric resolution where 95 percent of information is encoded in first few spectral bands. Spectral dimensionality has been found a major challenge. Therefore, dimension reduction before classification becomes important. The possibility of accurate classification of materials increments due to the detailed spectral information provided by these images. The two properties imbibed by hyperspectral sensors like AVIRIS, HYDICE, Hyperion, etc., are dominant to multispectral devices. The first covers the solar reflective wavelengths of 400-2400nm, producing complete continuous coverage of spectral reflectance characteristics and the second is the ample number of bands with high spectral resolution to represent distinct features. Among the hundreds of bands some are noisy and dispensable. Many adjoining bands are highly corresponding due to the gradual changing in spectral reflectance of materials over certain regions leads to redundant measurements. Hyperspectral images are ill edge preserving images be-cause of low spatial resolution. Therefore, in this experiment we have applied an edge preserving filter to the spectral images after reducing the spectral dimensions using PCA. Finally, the image is classified using Support Vector machine which proves to be a better classifier for hyperspectral images containing mixed vegetation classes. SVM helps in compounding the classification since it is flexible with the high dimensional data like hyperspectral images. Various classification techniques have been introduced for different type of geospatial images. Hyperspectral images provide applications like estimating biomass and biodiversity, recuperating physicochemical mineral properties, determining changes happening in wetland characteristics, in precision agriculture, determining water and land quality, etc., making it easier to study the various aspects of earth responsible for sustaining the lives on it [1]. Thus, classification becomes the base foundation of the algorithms for these applications and plays a major role. [2] proposed algorithm to enhance profile of the satellite image to classify terrain of different dimensionality using Gaussian and Hessian computations. Classified images become the major source of Geographic Information Systems (GIS) for generation of thematic map. Also, other forms of cartographic activities such as R2V and registration can be performed using the classified images better than an unclassified image [3][4]. The Ideas for applying the dimension reduction techniques before classification of hyperspectral image has been discussed in [5]. The research illustrates about the dimension reduction techniques which are separately evaluated with the hyperspectral imagery for classification purpose. The complication in handling hyperspectral images under supervised classification comes with the small ratio between training samples and the number of features. We take [6] the research forward and propose the classification of hyperspectral images using SVM after applying the preserving shape (PS) features on low spatial datasets. Dimension reduction on hyperspectral dataset was done to obtain the bands with highest information and eliminate the bands with low information content so as to reduce the feature dimension. This was obtained by using Principle Component Analysis which allows figuring out the patterns in a data converting into a lower dimension data set without loss of any important information and successfully giving principle bands. The experiment is conducted using MATLAB 2016 and in a system with quad core Intel CPU. # Proposed Experimental Method The proposed method is divided into four discrete steps besides input and display to the program. The first part illustrates the edge preserving features followed by second part which is application of PCA for dimension reduction. Third part explains the joint working of PCA and preserving filters and finally the fourth part describes the application of SVM for classification of the image pixels based on the feature vector. The shape preserving filter are successively built and stacked together. On these stacked filters, Principle component analysis is applied to calculate the mean square and point the spectral distinctness in the pixels. The final filters after PCA are classified with the help of SVM. The results obtained after testing on hyperspectral datasets prove that this method can efficiently classify the hyperspectral images. # Fig. 2: Pictorial Methodology of Classification a) Shape Preserving Filter The Shape or edge preserving filters have gained noticeable progress in the fields of computer vision and image processing [7][8]. Also, some of the algorithms related to this filter have been used for hyperspectral imagery [9][10][11][12]. The image processing algorithm, which preserves the geometric features of the image while cancelling out the noise in the content of the image is generally referred as the shape preservation filter. It works for the restoration of lines, edges and other geometric shapes of objects present in an image. The edge preserving filter was first reported in [12] which was used for pixel wise classification of digital images imbibing the spectral and spatial information. The sum of spatial difference and the intensity among the two pixels is given as approximation. Considering a one-dimensional signal 'K' as input the overall (approx.) distance-preserving transformation can be given by eq(1) Where M is converted domain signal and Ps, Pr are parameters to balance the amount of smoothness. Thus, signal given as input can be produces by recursive filtering and can be given by eqn-2. M i = K o + n m=1 1 + P s P r |K j ? K j?1 | (1) Where Ni is the filter taken as output of the ith pixel and p is the feedback constant whereas q gives the distance between two adjacent samples. The distance between two adjacent samples is given by q in the conversion domain. # b) Dimension Reduction using PCA The main objective of PCA is to reduce a complex dataset to show the concealed information by eliminating less in-formative bands. The algorithm has used PCA since it is a standard tool for dimensionality reduction not only for the remote sensing technology but for other fields as well. PCA is mathematically defined as an orthogonal linear transformation that transforms the data in to a new coordinate system such that the greatest variance by some projection of the data comes to lie on the first coordinate (called the first principal component), the second greatest variance on the second coordinate, and so on. PCA represents the data in a new coordinate system in which basis vectors follow modes of greatest variance in the data. Let a data matrix L, consist of observations J and I variables. The formula for the PCA will be given as follows: Where average of sample vectors constructs the principal components P. The principal components containing the highest information will be at the top. In this way they are arranged in order. The covariance matrix c is used to gives the following equation: Where D is the diagonal matrix obtained from eigen values of c. The eigen vectors of 'c' forms a matrix F. If there is [IXJ] matrix H, whose j th column is L j ? ? , then Since, ? is the mean vector and c is the covariance matrix, the following equations can be written as: For the input data L, the preserved components for the process will be G when dimension reduction is done. In MATLAB, the inbuilt function pca (L, G) is used where L is the matrix and G is the number of preserved components. PCA works in a suitable manner by extracting important information from the shape preserving filters and therefore is successful in accentuating the spectral differences among the classes composed of pixels. # c) Feature Extraction The difficulties faced are mostly due the reason that the measured data vectors are high-dimensional. It is possible to believe that high-dimensional data adheres measurements of an underlying source which are multiple and cannot be measured directly. Applying PCA on a hyperspectral image dataset can be difficult due to various bands. These bands contain noise and disturbed information which affects the required and important information. The need to diminish the image noise and save value of feature extraction, the dimension of hyperspectral image Data set is to be altered. A simple band averaging method can be used. The data K with I dimensions is sub grouped into e equal size alongside the spectral dimension. 'e' gives the number of bands after the dimensions are reduced, K=K1, K2, K3. . . ., Ke. The benefit of this dimension reduction allows the N i = (1 ? p q ) K i + p q N i?1 (2) p = exp(? ? 2/P s ) [0, 1](3)P = Q L (4) Q = F D ? 1 2 (5) H = [L 1 ? ?, ....., L J ? ?](6)? = 1 J (L 1 + .... + L J )(7)c = 1 J ? 1 HH T (8) Year 2020 ( ) F © 2020 Global Journals Classification of Hyperspectral Image using SVM Post-Processing for Shape Preserving Filter and PCA Fig. 4: a) Indian Pine Image; b). PaviaU Image; c). Salinas Image @IEEE Data Fusion Contest pixels of the reduced data to be in relation with the reflectance of the scene. The average based dimension reduction has proved to be sufficient. When the blurring degree is comparatively large, distinguishable pixels spectrally comes under distinguished objects. Whereas a high degree of smoothness is capable of decreasing the noise and increasing the pixels spectrally in the respective area. # d) Classification using SVM SVM stands in the category of algorithms which have proved to be highly accurate for not only low dimension dataset but also for high dimensional datasets. In comparison to the hyperspectral image classification, some of the published works are [13][14][15][16]. SVMs are successfully applied for solving problems like pattern recognition, regression, etc. They are independent of the dimensions specified by the input datasets. From previous research works, it has been shown that higher the dimensionality of the space, lower will be the volume ratio. Thus, the space tends to get empty due to increase in dimensionality and results in "centrifuge effect". Thus, when SVM plays potentially defining distinguishable functions on the basis of large number of samples, the results are accurate. Hyperspectral data allows SVM to distinguish between multiple classes. The datasets with high dimensionality are handled by SVM when there is a good speed of training and reduction in training sets by sequential sort out vectors which are to be annotated [17]. We have used nonlinear SVM kernel-based method. This method manages to be effective in computation of a high dimensionality feature space b(i). A kernel function can be given by eq (9) It helps in avoiding the computation of inner products simplifying the results of dual problem. Kernel function can be taken different also. The classification using SVM has been executed in MAT-LAB version2016 using LIBSVM library following radial basis function kernel. All the codes have been implemented in a system with 2.50 GHz CPU and 8 GB RAM. SVM parameter have been resolved by a fivefold cross validation. Later, to make the comparisons for overall accuracy and class accuracy have been calculated. # III. # Discussion on Datasets The algorithm was first applied to the Indian Pines image dataset which has been acquired by Airborne Visible Imaging Spectrometer (AVIRIS) in June 1992. Its dimensions are 145 x 145 with 224 spectral bands. Some of the bands at the lower levels did not give any relevant information and also affected the accuracy. They were affected by water and atmospheric absorption so were removed. 24 low SNR were discarded leaving with 200 bands. It can be inferred that the reference image contain 16 different classes mostly included type of crops. K(b i , b) = [b i .b + 1] b (10) K[b i .b] = ?(b i ).?(b)(9) The dataset provided by Airborne Visible Imaging Spectrometer was available with the first band of the hyper spectral image and their false composites. The different vegetation was segregated into classes as provided by the AVIRS and is shown in Fig5, Fig6, and Fig7. The two are further in this section and were also provided with their false composites and vegetation classes. The classification into vegetation classes like Oats, Wheat, Woods, etc., makes it useful for the agriculture sector and weather sector to predict crops with their area. Weather prediction plays an important role here. All the datasets were processed in MATLAB 2016 in 8GB RAM; Windows 10; intel processor. # Results and Discussion The algorithm was first applied on Indian Pine dataset. From Table1, it can be seen that the results acquired by our algorithm are better than doing classification by SVM alone on a hyperspectral image The algorithm was applied on two more datasets, i.e., Salinas and PaviaU hyperspectral Image dataset. The results are shown in the figure. All the parameters were also calculated for these datasets. The accuracy was our algorithm was high than the application of SVM alone. This verifies that Shape preserving filter with PCA is effective for SVM technique for the classification of the hyperspectral images. # Conclusion The motivation for this work was to built an efficient classification algorithm to differentiate between classes in a hyperspectral images. Hyperspectral images are proficient in giving various applications which are used to predict different prameters related to earth, be it the vegetation or the weather. Classification of hyperspectral image helps in structured planning of crops as well. In this paper, an algorithm has been proposed by adding a shape preserving filter with the dimension reduction technique to make the SVM classification more accurate. The benefit of PCA is that, it coelesce with the shape preserving filter effectively and helps in distinguishing the various classes in an image. This makes the algorithm more accurate. The accuracy obtained by applying Support Vector Machine is less than the algorithm with the PCA-shape presrving filter methodology. This algorithm is helpful for various applications produced through the classification of a hyperspectral image. Land use classification can be enhanced and analysis of crop field will be done appropriately. The detection of illegal agriculture which exists on large scale can be acquired too. The future work of this research is to improve the drawback of individually selecting the parameters of the filter which results in decrement of prime ability to apply in some of the practical needs. 1![Fig. 1: A Block diagram of the classification method](image-2.png "Fig. 1 :") 3![Fig. 3: a) Hyperspectral Band; (b) and (c) Shape preserving filter bands with distinguished settings](image-3.png "Fig. 3 :") 56![Fig. 5: Indian Pine Dataset:a). Three band color composite; b). Ground Data](image-4.png "Fig. 5 :Fig. 6 :") 7![Fig. 7: Salinas Dataset:a). Three band color composite; b). Ground Data The second dataset is Salinas image, captured by AVIRIs in Valley over agricultural areas, California. Similar to the first dataset, 20 bands were discarded leaving with 204 bands. The dimensions of the dataset are 512 x 217. The third dataset is Pavia U having dimensions 610 × 340 and 115 spectral bands. This dataset was acquired by reflective optics system imaging spectrometer (ROSIS-03) optical sensor over an urban area around University of Pavia, Italy. 12 irrelevant bands were discarded leaving with 103 bands. It has 16 classes, most of which are man-made building.](image-5.png "Fig. 7 :") 8![Fig. 8: a). False composite image of Indian Pine dataset, b) Classified Image after SVM algorithm, c) Classified Image after our algorithm IV.](image-6.png "Fig. 8 :") ![. The accuracy improved by contributing 1% of the ground truth data into training samples. Table1 shows the comparison by calculating accuracy of classification per class and later by calculating overall accuracy. Table2 also shows the calculated Kappa coefficient and class accuracy. The false color composition of the image is also compared with the color composite classification of the image.](image-7.png "") 9![Fig. 9: a) PaviaU hyperspectral Image, b). classified image after applying our algorithm](image-8.png "Fig. 9 :") 10![Fig. 10: a) Salinas hyperspectral Image, b). classified image after applying our algorithm V.](image-9.png "Fig. 10 :") ![Journal of Computer Science and Technology Volume XX Issue I Version I Classification of Hyperspectral Image using SVM Post-Processing for Shape Preserving Filter and PCA](image-10.png "Global") 1Class NameSVM accuracy per classOur algorithm accuracyAlfalfa26.1295.52Corn N45.8774.95Corn M42.6972.11Corn25.3375.78Grass M56.3489.65Grass T76.8792.43Grass P26.1281.30Hay W92.4597.98Oats9.3286.86Soybean N40.5369.71Soybean M60.7790.67soybean C26.1887.42wheat76.0899.02wood85.6294.63buildings22.7694.32stone80.5592.79 2ParametersSVM algorithmOur Algorithmoverall accuracy52.1786.28class accuracy51.2287.03Kappa coefficient45.5684.51 Year 2020 ( ) F © 2020 Global Journals Classification of Hyperspectral Image using SVM Post-Processing for Shape Preserving Filter and PCA ( ) F © 2020 Global Journals Classification of Hyperspectral Image using SVM Post-Processing for Shape Preserving Filter and PCA © 2020 Global Journals Classification of Hyperspectral Image using SVM Post-Processing for Shape Preserving Filter and PCA * Advances in spectralspatial classification of hyperspectral images MFauvel YTarabalka JABenediktsson JChanussot JCTilton Proc. IEEE 2013 IEEE 2013 101 * Classification of changed pixels in satellite images using Gaussian and Hessian functions NPanigrahi BKMohan GAthithan Proceedings of ICVCI 2011, International Conference on VLSI, Communication and Instrumentation ICVCI 2011, International Conference on VLSI, Communication and Instrumentation April, 2011 * Geographic Information Science NPanigrahi Geographical Information Science Hyderabad University Press 2009 * Computations in Geographic Information System NPanigrahi 2014 CRC Press US * Impact Evaluation of Feature Reduction Techniques on Classification of Hyperspectral Imagery NPanigrahi MPrashnani July, 2014 Springer * Dimensionality reduction of hyperspectral data via spectral feature extraction BMojaradi HAbrishami-Moghaddam MJ VZoej RP WDuin IEEE Trans. Geosci. Remote Sens 47 7 Jul. 2009 * Fast costvolume filtering for visual correspondence and beyond AHosni CRhemann MBleyer CRother MGelautz IEEE Trans. Pattern Anal. Mach. Intell 35 2 Feb. 2013 * Edge-preserving decompositions for multi-scale tone and detail manipulation ZFarbman RFattal DLischinski RSzeliski ACM Trans. Graph 27 3 Aug. 2008 * Feature extraction of hyper-spectral images with image fusion and recursive filtering XKang SLi JABenediktsson IEEE Trans. Geosci. Remote Sens 52 6 Jun. 2014 * Spectral spatial classification of hyperspectral images using ICA and edgepreserving filter via an ensemble strategy JXia LBombrun TAdal YBerthoumieu CGermain IEEE Trans. Geosci. Remote Sens 54 8 Aug. 2016 * Hierarchical guidance filtering-based ensemble classification for hyperspectral images BPan ZShi XXu IEEE Trans. Geosci. Remote Sens 55 7 Jul. 2017 * Spectralspatial hyperspectral image classification with edgepreserving filtering XKang SLi JABenediktsson IEEE Trans. Geosci. Remote Sens 52 5 May 2014 * A survey on spectral-spatial classification techniques based on attribute profiles PGhamisi MDMura JABenediktsson IEEE Trans. Geosci. Remote Sens 53 5 May 2015 * Classification of hyperspectral data from urban areas based on extended morphological profiles JABenediktsson JAPalmason JRSveinsson IEEE Trans. Geosci. Remote Sens 43 3 Mar. 2005 * Classification of hyperspectral images by using extended morphological attribute profiles and independent component analysis MDMura AVilla JABenediktsson JChanussot LBruzzone IEEE Geosci. Remote Sens. Lett 8 3 May 2011 * Automatic generation of standard deviation attribute profiles for spectral-spatial classification of remote sensing data PRMarpu MPedergnana MDMura JABenediktsson LBruzzone IEEE Geosci. Remote Sens. Lett 10 2 Mar. 2013 * Selecting training sets for support vector machines: a review JNalepa MKawulok 10.1007/s10462-017-9611-1 Artif Intell Rev 52 2019