How do I load my Dataset into Matlab using imageDatastore ??

1 回表示 (過去 30 日間)
Chidiebere Ike
Chidiebere Ike 2018 年 4 月 9 日
回答済み: T.Nikhil kumar 2022 年 7 月 9 日
My dataset "Z" is a folder that has sub folders ('Z1-Z40'); each sub-folder contains images. Using imageDatastore function, How do I load my entire dataset 'Z' in Matlab. I have tried severally but wasn't successful. Thank you.
if true
% code
end

回答 (1 件)

T.Nikhil kumar
T.Nikhil kumar 2022 年 7 月 9 日
Hey Ike!
As per my understanding ,you want to load the data from datset into matlab and create an imageDatastore.
To include all the images from your subfolders into the imagedatastore you must set the value of IncludeSubfolders property to true. The command is as follows:
imds = imageDatastore(fullPath,"IncludeSubfolders",true)
Here fullPath is the full file path of Z folder ,
I suggest you to go through the following link for reference:

Community Treasure Hunt

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

Start Hunting!

Translated by