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 :

채택된 답변

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 CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by