Question on imageDataStore syntax and parameters

5 ビュー (過去 30 日間)
Kingsley Chan
Kingsley Chan 2017 年 7 月 18 日
コメント済み: Sarhan 2020 年 4 月 11 日
Hi all, I face some problems with imageDataStore function. Can anyone please explain the syntax or parameter involved?
First example:
imds = imageDatastore(fullfile(matlabroot,'toolbox','matlab'),...
What means by 'true', what's the effect of 'File Extensions' selected, and what's 'LabelSources' and 'foldernames' refer to?
Second example:
outputFolder = fullfile(tempdir, 'caltech101');
rootFolder = fullfile(outputFolder, '101_ObjectCategories');
categories = {'airplanes', 'ferry', 'laptop'};
imds = imageDatastore(fullfile(rootFolder, categories), 'LabelSource', 'foldernames');
Is there any relationships between 'LabelSources' and 'foldernames' with 'rootFolder' and 'categories'?
Thank you in advanced.
  1 件のコメント
Sarhan 2020 年 4 月 11 日
Hi Every body: ImageDatastore does not read all the subfolders in the root directory 'junk', it only reads the first subdirectory in 'junk' Using the statement
>> imdsx=imageDatastore(fullfile('C:\Users', 'sarhan', 'Desktop', 'junk'),'IncludeSubfolders' , 1, 'LabelSource','foldernames')
Any answers would be appreciated.



Grzegorz Knor
Grzegorz Knor 2017 年 7 月 18 日
編集済み: Grzegorz Knor 2017 年 7 月 18 日
All 'Name-Value Pair' arguments are described in the documentation:
For example: 'IncludeSubfolders' - Subfolder inclusion flag, specified as the comma-separated pair consisting of 'IncludeSubfolders' and true, false.
  2 件のコメント
Rik 2019 年 6 月 18 日


その他の回答 (0 件)


Help Center および File ExchangeBig Data Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by