Covariance of Images data set

5 次查看(过去 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 CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by