Covariance of Images data set

4 ビュー (過去 30 日間)
shawin
shawin 2018 年 10 月 12 日
編集済み: shawin 2018 年 10 月 12 日
I have the code below:
Np=40;
TI = 10; % number of images per person
for NTr = 1 : 9;
c=1;
for i=1:NP
for j=1:NTr
im = ['face' int2str(rndMtrx(itr,(i-1)*TI+j)) '.bmp'];
[X,MAP]=imread(im);
x=ind2gray(X,MAP);
Train(:,c) = x(:);%double(x(:))/norm(double(x),2); % norm(x,2) for normalization.
c=c+1;
end
end
then i should calculate the covariance of the iamges :
covar= cov(Train);
Iam getting the error below:
*meaError using bsxfun
Mixed integer class inputs are not supported.
Error in cov (line 154)
xc = bsxfun(@minus,x,sum(x,1)/m); % Removen*
any help please?

回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by