Question on imageDataStore syntax and parameters

2 vues (au cours des 30 derniers jours)
Kingsley Chan
Kingsley Chan le 18 Juil 2017
Commenté : Sarhan le 11 Avr 2020
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'),...
'IncludeSubfolders',true,'FileExtensions','.tif','LabelSource','foldernames')
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 commentaire
Sarhan
Sarhan le 11 Avr 2020
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.

Connectez-vous pour commenter.

Réponse acceptée

Grzegorz Knor
Grzegorz Knor le 18 Juil 2017
Modifié(e) : Grzegorz Knor le 18 Juil 2017
All 'Name-Value Pair' arguments are described in the documentation: https://uk.mathworks.com/help/matlab/ref/imagedatastore.html#namevaluepairarguments
For example: 'IncludeSubfolders' - Subfolder inclusion flag, specified as the comma-separated pair consisting of 'IncludeSubfolders' and true, false.
  2 commentaires
Kingsley Chan
Kingsley Chan le 18 Juil 2017
Thank you! Didnt't see it just now, haha
Rik
Rik le 18 Juin 2019

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Predictive Maintenance Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by