I wish to import all the image into a .mat file for machine learning.
조회 수: 4(최근 30일)
Shadaab Siddiqie 2021년 6월 15일
편집: Shadaab Siddiqie 2021년 8월 4일
From my understanding you want to import multiple images into MATLAB. Here is a code which might help you:
% Read in all images from a folder called 'images'
imgFolder = fullfile('images');
imgs = imageDatastore(imgFolder);
numOfImgs = length(imgs.Files);
for ii = 1:numOfImgs
% do operation on the images as your requirement
You can refer imageDatastore for more information.