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

2 vues (au cours des 30 derniers jours)
abdullah al-dulaimi
abdullah al-dulaimi le 12 Juil 2022
Commenté : Jan le 12 Juil 2022
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 :

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Import, Export, and Conversion dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by