How to convert all path images folder to one .mat file

2 次查看(过去 30 天)
I have path folder 'C:\Users\hp\Desktop\testing\abood' have 140 images, i want to conver all folder in one .mat file .
for example :

采纳的回答

Jan
Jan 2022-7-12
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 个评论
abdullah al-dulaimi
please , I want just 2 coluoms 1- imageFilename (path of images) and 2- Vehicles
Jan
Jan 2022-7-12
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?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Import, Export, and Conversion 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by