hyperpca applied to a set of several hyperspectral images
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to perform the PCA of several hyperspectral images.
I want to make one PCA with the entire set of images, not one PCA per image. To do this I run into several problems.
- The first problem is that the data takes up a large amount of memory and the hyperpca function does not accept using tall arrays. Matlab's PCA function does allow me to work with tall arrays but I don't know how to perform a PCA for a three-dimensional array.
- The second is that if I have to carry out the PCA of each of the images individually, how can I combine the PCAs?
If anyone can give me a hand I would appreciate it.
0 commentaires
Réponses (1)
John D'Errico
le 30 Mai 2024
Modifié(e) : John D'Errico
le 30 Mai 2024
You cannot combine multiple PCA analyses. Since each one requires the computation of the eigenvalues and eigenvectors of a matrix, that is a highly nonlinear operation. There would be no simple magic to combine the multiple solutions into one, done after the fact.
Instead, you would need to concatenate the images into one tall array, since PCA can handle tall arrays. And that is eminently doable.
Ta = tall(rand(100,3));
Tb = tall(rand(100,3));
Tab = [Ta;Tb];
whos Tab
So tall arrays can be vertically concatenated. And that means I can perform a PCA on Tab.
pca(Tab)
0 commentaires
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!