Can PCA be applied directly on an image?

1 回表示 (過去 30 日間)
sidra
sidra 2013 年 11 月 13 日
コメント済み: sidra 2013 年 11 月 21 日
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 件のコメント
Algorithms Analyst
Algorithms Analyst 2013 年 11 月 13 日
Check ur image type should be double date try.
sidra
sidra 2013 年 11 月 14 日
Algorithms Analyst ,the image type is double.

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2013 年 11 月 14 日
Apply it to im2double() of the image.

その他の回答 (1 件)

sidra
sidra 2013 年 11 月 18 日
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);"
  1 件のコメント
sidra
sidra 2013 年 11 月 21 日
Any suggestions?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

製品


Translated by