Using imread> error; Get_full_filename (line 481)
File "C: \ Users \ \ Administrator \ \ Pictures \ Saved Pictures \ shell Pictures \ 6. JPG" does not exist,
Error imread (line 344)
Filename=get_full_filename (fid, errmsg, filename);
Error photoclassify (line 18)
I=imread (FullPath);
The main program: (include a few custom function)
% image classification
clc;
FilePath='C: \ Users \ \ Administrator \ \ Pictures \ Saved Pictures \ shell Pictures \';
='D: \ % FilePath Corel \ CorelImg1 \';
% the count of the graph in the same group
Kindcount=50;
For kind=0:5
Num=1;
Array=cell (kindcount, 1);
For I=1: kindcount
% the read every graph in a order number in a specific range
FileName=sprintf (' surprised % jeter pg, kind * 100 + I - 1);
FullPath=strcat (FilePath, FileName);
I=imread (FullPath);
% extract the image feature
FR=getFeature (I);
% the save the feature data in the array.
Array {I}=FR;
Wvctor=sofm (FR);
Wvctor=wvctor ';
[cout, dim]=size (wvctor);
% the save the feature data clustered once more in the FRG
FRG (num: num + cout - 1, :)=wvctor;
Num=num + cout.
End
% cluster again from all the graph in the same group
Wvctors=sofm (FRG);
For I=1: kindcount
One Array of={I};
[d] c=size (one);
For j=1 0
Vdist=dist (one, wvctors (:, j));
For k=1: c
If (vdist (k) & lt; 40)
Vdist (k)=1;
The else
Vdist (k)=0.
End
End
P (j)=sum (vdist);
End
Svmdata (I)=P;
End
Svmdata=https://bbs.csdn.net/topics/svmdata/c;
end
CodePudding user response:
Is may file does not exist? Check the