Question on imageDataStore syntax and parameters
조회 수: 3 (최근 30일)
이전 댓글 표시
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
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
2017년 7월 18일
편집: Grzegorz Knor
2017년 7월 18일
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.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!