I wish to import all the image into a .mat file for machine learning.

조회 수: 2 (최근 30일)
Ou Jin Sheng
Ou Jin Sheng 2021년 6월 11일
편집: Shadaab Siddiqie 2021년 8월 4일
How to solve the error as the existing image file is in jpg type?
Or is there any alternative method to prepare dataset for machine learning
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 6월 11일
There are a number of different problems with what you have done.
But I recommend that instead of trying to fix it, that you instead use an imageDatastore https://www.mathworks.com/help/matlab/ref/matlab.io.datastore.imagedatastore.html . Many of the Deep Learning algorithms already know how to handle those.

댓글을 달려면 로그인하십시오.

답변 (1개)

Shadaab Siddiqie
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
end
You can refer imageDatastore for more information.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by