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

1 回表示 (過去 30 日間)
abdullah al-dulaimi
abdullah al-dulaimi 2022 年 7 月 12 日
コメント済み: Jan 2022 年 7 月 12 日
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 :
  1 件のコメント
abdullah al-dulaimi
abdullah al-dulaimi 2022 年 7 月 12 日
The images above just 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
abdullah al-dulaimi 2022 年 7 月 12 日
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 Center および File ExchangeData Type Conversion についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by