This project explores the classification of hyperspectral images using a fusion of spectral and spatial features. Hyperspectral imaging (HSI) is a computer vision modality that combines standard 2D imaging with spectroscopy to acquire a three-dimensional hypercube. HSI has been used in various fields, such as remote sensing and medical image diagnosis. The goal of this project is to improve the accuracy and efficiency of hyperspectral image classification by incorporating spatial features along with spectral features.
The project implements and compares two spatial-spectral HSI classification methods and evaluates their performance in terms of accuracy, kappa coefficient, and total time taken.
- Semi-supervised learning method for classification based on Spatial Majority Voting [1].
- Edge-Preserving Filters (EPFs) method with PCA-based dimensionality reduction [2].
- Install MATLAB (version R2021a or later) from the official website.
- Clone this repository to your local machine.
- Install necessary MATLAB toolboxes:
- Image Processing Toolbox
- Statistics and Machine Learning Toolbox
- Download the following datasets:
- AVIRIS Indian Pines dataset: Indian Pines Dataset
- Pavia University dataset: Pavia University Dataset
- Pavia Centre dataset: Pavia Centre Dataset
- Place the downloaded datasets in the
data
folder within theSpatialMajorityVoting
andPCA-EPFs
directories.
- Open the
SpatialMajorityVoting
folder in MATLAB. - Run the
DemoSpectralClassifier
MAT file.
- Open the
SpatialMajorityVoting
folder in MATLAB. - Run the
DemoSpatialClassifier.m
MAT file.
- Open the
PCA-EPFs
folder in MATLAB. - Run the
pca_epfssdemo.m
MAT file.
The dataset used in this project is the AVIRIS Indian Pines dataset, which consists of an HSI image of 145x145 pixels and 224 different spectral bands. The scene includes agricultural, forest, and vegetation objects, as well as structures such as highways, rail lines, and housing. Objects within the scene are distributed into 16 different class labels of crops, such as corn and soybeans.
The performance of the implemented classification methods is evaluated using the overall accuracy, kappa coefficient metrics, and total time taken.
This project is released under the MIT License. See LICENSE for details.
This project was developed by Nauman Baig under the supervision of Prof. Ling Guan at Ryerson University.
[1] Deok Han, Qian Du, and Nicolas H Younan. "Semisupervised classification of hyperspectral remote sensing images with spatial majority voting". In: 2016 9th IAPR Workshop on Pattern Recogniton in Remote Sensing (PRRS). IEEE. 2016, pp. 1-4.
[2] Xudong Kang et al. "PCA-based edge-preserving features for hyperspectral im- age classification". In: IEEE Transactions on Geoscience and Remote Sensing 55.12 (2017), pp. 7140-7151.
[3] Kang Xudong (2020). Hyperspectral Image Classification (https://www.mathworks.com/matlabcentral/fileexchange/69242-hyperspectral-image-classification), MATLAB Central File Exchange. Retrieved April 18, 2020.
[2] Galad_Loth (2020). Hyperspectral Image Classification (https://github.com/galad-loth), Github.