Effacer les filtres
Effacer les filtres

Why do i get this error ??

1 vue (au cours des 30 derniers jours)
dp sb
dp sb le 21 Juil 2015
Commenté : dp sb le 21 Juil 2015
I am trying to run a batch process and i get this error while reading, why is that ??
Code:
files = dir('C:\Project\Research\Image\Reel_3\*.tif');
for k = 1:numel(files)
I = imread(files(k).name);
.
.
.
Error
Error using imread (line 349)
File "00585_1u.tif" does not exist.
Error in FaultImageFind (line 3)
I = imread(files(k).name)
Those files do exist in the folder and i could get all the info using files(), files().name but i just wonder why it throws an error while reading ? Could be a silly mistake but can't figure it out!!

Réponse acceptée

Walter Roberson
Walter Roberson le 21 Juil 2015
folder = 'C:\Project\Research\Image\Reel_3';
files = dir(fullfile(folder, '*.tif'));
I = imread(fullfile(folder, files(k).name));
  1 commentaire
dp sb
dp sb le 21 Juil 2015
Thank You!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by