for文内で作成したimageDatastoreの結合
Show older comments
1つのフォルダの中に3つのサブフォルダがありそれぞれにimageが何枚かずつ保存されている場合、
以下のように親となるフォルダを指定しまとめてイメージデータストアを作成できることは確認しました。
%参照したいimageが含まれるサブフォルダの手前までのパス
datasetpath = " ";
imds = imageDatastore(path,'IncludeSubfolders',true,'LabelSource','foldernames');
対して、以下のようにfor文内でそれぞれサブフォルダごとのイメージデータストアを作成して結合させることで上記と同じイメージデータストアを作成することは可能でしょうか。
%参照したいimageが含まれるサブフォルダのパス
datasetpath = [" "," "," "];
for i=1:length(datasetpath)
path = datasetpath{i};
imds = imageDatastore(path,'IncludeSubfolders',true,'LabelSource','foldernames');
end
Accepted Answer
More Answers (0)
Categories
Find more on 大規模なイメージ ファイル in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!