How to convert all path images folder to one .mat file
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
abdullah al-dulaimi
el 12 de Jul. de 2022
Comentada: Jan
el 12 de Jul. de 2022
I have path folder 'C:\Users\hp\Desktop\testing\abood' have 140 images, i want to conver all folder in one .mat file .![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1062390/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1062390/image.jpeg)
for example :
Respuesta aceptada
Jan
el 12 de Jul. de 2022
Folder = 'C:\Users\hp\Desktop\testing\abood';
FileList = dir(fullfile(Folder, '*.jpg'));
Data = cell(1, numel(FileList));
for k = 1:numel(FileList)
File = fullfile(FileList(k).folder, FileList(k).name);
Data{k} = imread(File);
end
save(fullfile(Folder, 'Images.mat'), 'Data');
2 comentarios
Jan
el 12 de Jul. de 2022
What kind of coumns are you talking of? Do you want to create a table object? Do you want a formatted text output`or a cell array?
Más respuestas (0)
Ver también
Categorías
Más información sobre Import, Export, and Conversion en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!