Can PCA be applied directly on an image?

1 visualizzazione (ultimi 30 giorni)
sidra il 13 Nov 2013
Commentato: sidra il 21 Nov 2013
Can PCA be applied directly on an image, in contrast to a matrix(in which rows correspond to observations & columns to variables)?
When i try to apply PCA using SVD/Covariance directly on an image i get the following error:
"Error using minus
Integers can only be combined with integers of same class or scalar doubles.
Error in pca2 at 14
Thanking you in advance
  2 Commenti
sidra il 14 Nov 2013
Algorithms Analyst ,the image type is double.

Accedi per commentare.

Risposta accettata

Walter Roberson
Walter Roberson il 14 Nov 2013
Apply it to im2double() of the image.

Più risposte (1)

sidra il 18 Nov 2013
Walter, it works fine for a single image but when i try the same on array of images i get the error :
"Array dimensions must match for binary array op.
error in pca2 at 14
error in db.pca at 18


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by