Hi, is there any way to create code for imread image using pwd, without declarad specific directory?
like :
im = imread(pwd,'.bmp');
could help me for this? thank you

 Réponse acceptée

Walter Roberson
Walter Roberson le 16 Jan 2019

1 vote

projectdir = pwd;
for K = 1 : 10
basename = sprintf('subject_%05d_sagital.bmp', K);
fullname = fullfile(projectdir, basename);
im = imread(fullname);
end

3 commentaires

Oman Wisni
Oman Wisni le 16 Jan 2019
this get error sir,
error using imread.
File "D:subjecy_00001_sagital.bmp" does not exist.
I mean, without create specific folder and specific name of image. after run can choose image
Walter Roberson
Walter Roberson le 16 Jan 2019
see uigetfile
Oman Wisni
Oman Wisni le 17 Jan 2019
Yes sir, I already got what I need for this. Thank you for the answer

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by