Super simple problem with imread
Mostrar comentarios más antiguos
So I know that this will be a simple fix, I am not very familiar with Matlab.
I am trying to read in a picture using imread using this code...
path = 'C:\Users\chris\Documents\Homework\ThermoFluids\Sphere Drag\Orange1_C001H001S0001';
Directory = dir([path '/*.tif']);
picture = imread(Directory(1).name);
imshow(picture);

Those are all .tif files. This code was working for an adjacent folder and I can't figure out why it isn't working for this folder.
The error matlab is giving me is shown below...
Error using imread>get_full_filename (line 566)
File "Orange1_C001H001S0001000001.tif" does not exist.
Error in imread (line 375)
fullname = get_full_filename(filename);
Error in SphereDrag (line 7)
picture = imread(Directory(1).name);
>>
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 27 de Oct. de 2019
picture = imread( fullfile(path, Directory(1).name) );
Categorías
Más información sobre Search Path en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!