Plsss help me to solve this error???
Traindatabasepath='E:\PROJECT2\original\appleleaves\ceder';Trainfiles=dir(Traindatabasepath);Trainnum=0;for ii=1:size(Trainfiles,1) if not(strcmp(Trainfiles(ii).name,'.')|strcmp(Trainfiles(ii).name,'..')|strcmp(Trainfiles(ii).name,'Thumbs.db')) Trainnum=Trainnum+1; endendimgccount=1;for imgn=1:Trainnumimg=imread(strcat(Traindatabasepath,'\',num2str(imgn),'.jpg'));% imshow(i);
% j=imresize(i,[256 256]);
% figure,imshow(j);
[r c]=size(img);%global feature extraction
HSV=rgb2hsv(img);H=HSV(:,:,1);S=HSV(:,:,2);V=HSV(:,:,3);HM=mean(H(:));SM=mean(S(:));VM=mean(V(:));k=1;[r1 c1]=size(H);for m=1:8:r1-7 for n=1:8:c1-7 BH=H(m:m+7,n:n+7); BS=S(m:m+7,n:n+7); BV=V(m:m+7,n:n+7); BHM=mean(BH(:)); BSM=mean(BS(:)); BVM=mean(BV(:)); BMN=[BHM BSM BVM]'; BMEAN(k,:)=BMN; k=k+1; endendIH=zeros(k-1,1);IS=zeros(k-1,1);IV=zeros(k-1,1);for p=1:k-1 if (BMEAN(p,1)>=HM) IH(p)=1; end if (BMEAN(p,1)>=SM) IS(p)=1; end if (BMEAN(p,3)>=VM) IV(p)=1; endend% IHSV=[IH IS IV]';
%IHSVMEAN(imgn,:,:)=IHSV;
IHSV=[IH' IS' IV'];IHSVMEAN(imgn,:)=IHSV;endsave colorlocal IHSVMEAN
Best Answer