i need help to solve this error
이전 댓글 표시
want to read all images in specific folder But the error occur and I don't know why and what to do. i need help
code :
want to read all images in specific folder But the error occur and I don't know why and what to do. i need help
code :
clear all;
close all;
disp(' ')
disp('Step 1:')
filter_bank = construct_Gabor_filters_PhD(8, 5, [180 160]);
data_matrix = [];
ids = [];
conut = 0;
% construct image string, load image and extract features
for i=1:503
for j=1:5
s = sprintf('D:\ajorMinorKnuckleFingerprint\First Minor knuckle index\%i_%i.bmp',i,j);
X = imread(s);
X=rgb2gray(X);
featureg= filter_image_with_Gabor_bank_PhD(X,filter_bank,64);
data_matrix = [data_matrix,bsifhistr(:)];
bsifhistr=bsif(X,ICAtextureFilters,'nh');
data_matrix=[data_matrix,bsifhistr(:)];
ids = [ids;i];
conut = conut+1;
disp(sprintf('Finished with feature extraction from image %i/%i',conut,400));
end
end
and this is erreur :

댓글 수: 1
Chad Greene
2021년 3월 13일
It looks like the problem is this line:
s = sprintf('D:\ajorMinorKnuckleFingerprint\First Minor knuckle index\%i_%i.bmp',i,j);
It would help if you can
- describe in words what you were trying to accomplish with that line, and
- provide an unambiguous example filename (perhaps for i=1 and j=2) that you would like the sprintf line to create.
답변 (1개)
The backslash has special meaning in MATLAB as an escape character. If you actually want a backslash, you have to use "\\".
i=1;
j=3;
s = sprintf('D:\\ajorMinorKnuckleFingerprint\\First Minor knuckle index\\%i_%i.bmp',i,j)
카테고리
도움말 센터 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!