# Implementation of PCA for hyper-spectral Image Processing

I have been studying the concept of PCA and its implementation for dimensionality reduction for more than 1 month. My goal is to classify a hyperspectral image using sparse representation by the linear combination concept which is as follow:

$$y = Dx$$

So consider $$D$$ as a dictionary with $$d\times B$$ dimension where $$d=3000$$ is the number of samples and $$B=200$$ is the number of band/channel.

Now I am trying to construct the $$D$$ by this mean that the classes (sub-dictionaries) are well separated. Therefore I want to apply PCA to individual sub-dictionary in order to form the main dictionary.

However, my goal is to apply PCA on hyperspectral satellite imagery like this.

I have implemented the PCA in Octave and project my data on that particular low dimension. But my question is should I reduce the number of training pixels(observation=d) or reduce the variable dimension ($B$)?

Since I use sparse representation and dictionary concept then reducing the dimension of $$d$$ (observation pixels for individual classes) is more make sense rather than reducing the number of features ($$B$$). But I am not sure if I am right or not.

After constructing the $$D$$ should I transform $$y$$ to PCA dimension before computing its spars coefficients or not?

• typically, PCA selects the principal components from your multi-dimensional signal, i.e. in your case, it reduces $B$ without reducing the number of observation you've got. – Marcus Müller Jan 11 at 16:03
• But I manipulate the covariance matrix to have a pairwise pixels evaluation by means of covariance quantity, instead of computing covariance between variables. therefore I am able to compute the eigenvectors and their corresponding eigenvalues for samples (we have lots of reduction vector [pixel]) – morteza Jan 14 at 1:20
• that can be presented by A scalar multiplication of another. So lets only use certainty, not uncertainty (in terms of variance of the data). – morteza Jan 14 at 1:29
• The linear algebra five us two amazing concept cal Linearly-Dependent and Linearly-Independent. That is the way we can cover the main info with only the main numbers. – morteza Jan 14 at 1:30