出錯提示:
錯誤使用 imread>get_full_filename (line 481)
檔案 "C:\Users\Administrator\Pictures\Saved Pictures\貝殼圖片\6.jpg" 不存在。
出錯 imread (line 344)
filename = get_full_filename(fid, errmsg, filename);
出錯 photoclassify (line 18)
I = imread(FullPath);
主程式:(包含幾個自定義函式)
%影像分類
clc;
FilePath = 'C:\Users\Administrator\Pictures\Saved Pictures\貝殼圖片\';
%FilePath = 'D:\Corel\CorelImg1\';
% count of the graph in the same group
kindcount = 50 ;
for kind=0:5
num = 1;
Array = cell(kindcount, 1) ;
for i=1:kindcount
% read every graph in a order of number in a specific range
FileName = sprintf('%d.jpg', kind*100+i-1) ;
FullPath = strcat(FilePath, FileName) ;
I = imread(FullPath);
% 提取影像特征
FR = getFeature(I) ;
% save the feature data in the array.
Array{i} = FR;
wvctor = sofm(FR) ;
wvctor = wvctor' ;
[cout, dim] = size(wvctor) ;
% 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{i};
[c d] = size(one) ;
for j=1:200
vdist = dist(one, wvctors(:, j)) ;
for k=1:c
if (vdist(k)<40)
vdist(k) = 1;
else
vdist(k) = 0;
end
end
P(j) = sum(vdist) ;
end
svmdata(i, :) = P ;
end
svmdata = svmdata/c;
end
uj5u.com熱心網友回復:
可能檔案就是不存在吧?檢查一下轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/59059.html
標籤:工具平臺和程序庫
上一篇:單片機與pc端的串行通信QAQ
下一篇:CLion 使用配置 Qt CreateProcess error=193, %1 不是有效的 Win32 應用程式。
