for文内で作成したimageDatastoreの結合
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 大規模なイメージ ファイル dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!