MATLAB Answers


Question on imageDataStore syntax and parameters

Asked by Kingsley Chan on 18 Jul 2017
Latest activity Commented on by Rik
on 18 Jun 2019
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.


Sign in to comment.

1 Answer

Answer by Grzegorz Knor on 18 Jul 2017
Edited by Grzegorz Knor on 18 Jul 2017
 Accepted Answer

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.


Thank you! Didnt't see it just now, haha

Sign in to comment.