Filter löschen
Filter löschen

Covariance of Images data set

3 Ansichten (letzte 30 Tage)
shawin
shawin am 12 Okt. 2018
Bearbeitet: shawin am 12 Okt. 2018
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?

Antworten (0)

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by