How to convert all path images folder to one .mat file
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
abdullah al-dulaimi
am 12 Jul. 2022
Kommentiert: Jan
am 12 Jul. 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 :
Akzeptierte Antwort
Jan
am 12 Jul. 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 Kommentare
Jan
am 12 Jul. 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?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Import, Export, and Conversion finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!