Cannot open file , no permission

7 ビュー (過去 30 日間)
Fareeha Yaseen
Fareeha Yaseen 2017 年 12 月 3 日
回答済み: Walter Roberson 2017 年 12 月 4 日
letters={'a'; 'b'; 'c'; 'd'; 'e'; 'f'; 'g'; 'h'; 'i'; 'j'; 'k'; 'l'; 'm'; 'n'; 'o' ;'p'; 'q'; 'r'; 's'; 't' ; 'u' ;'v' ;'w'; 'x' ;'y'; 'z'; 'aa'; 'bb'; 'cc'; 'dd'; 'ee'; 'ff'; 'gg'; 'hh'; 'ii'; 'jj'; 'kk'; 'll'; 'mm'; 'nn'; 'oo'; 'pp'; 'qq'; 'rr'; 'ss'; 'tt'; 'uu'; 'vv'; 'ww'; 'xx'; 'yy'; 'zz'; 'num0'; 'num1'; 'num2'; 'num3'; 'num4'; 'num5'; 'num6'; 'num7'; 'num8'; 'num9'};
increment =1;
for y = 1: 62
for k = 1 : 10
test = strcat(letters(y,:) , num2str(k));
imageName = imread('training_set',test,'.png');
imageName = rgb2gray(imageName);
x(:, increment) = (feature_extract(~im2bw(imageName)));
increment = increment + 1;
end;
end;
x = x';
Error using imread (line 347) Cannot open file "training_set" for reading. You might not have read permission.
Error in myFeatureScript (line 6) imageName = imread('training_set',test,'.png');
Please Help !!

回答 (2 件)

chandrapal Singh
chandrapal Singh 2017 年 12 月 4 日
a=strcat('Your_Path\','Image.extenstion');
imageName =imread(a);

Walter Roberson
Walter Roberson 2017 年 12 月 4 日
imageName = imread(['training_set',test,'.png']);

カテゴリ

Help Center および File ExchangeMATLAB Report Generator についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by