Borrar filtros
Borrar filtros

Can PCA be applied directly on an image?

1 visualización (últimos 30 días)
sidra
sidra el 13 de Nov. de 2013
Comentada: sidra el 21 de Nov. de 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
data=data-repmat(mn,1,N);"
Thanking you in advance
  2 comentarios
Algorithms Analyst
Algorithms Analyst el 13 de Nov. de 2013
Check ur image type should be double date try.
sidra
sidra el 14 de Nov. de 2013
Algorithms Analyst ,the image type is double.

Iniciar sesión para comentar.

Respuesta aceptada

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

Más respuestas (1)

sidra
sidra el 18 de Nov. de 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
data=data-repmat(mn,1,N);
error in db.pca at 18
pc=pca2(imagearray);"

Categorías

Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by