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 CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by