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 comentario

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
  1. describe in words what you were trying to accomplish with that line, and
  2. provide an unambiguous example filename (perhaps for i=1 and j=2) that you would like the sprintf line to create.

Iniciar sesión para comentar.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 13 de Mzo. de 2021
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)
s = 'D:\ajorMinorKnuckleFingerprint\First Minor knuckle index\1_3.bmp'

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 13 de Mzo. de 2021

Respondida:

el 13 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by