Covariance of Images data set
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!