for文内で作成したimageDatastoreの結合
14 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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
0 Commenti
Risposta accettata
Hernia Baby
il 7 Mar 2022
2つ方法があります
imdsCombined = combine(imdsdsL,imdsdsR);
2. cellで複数のpathを格納して読み込む
imdsCombined = datastore({'path to dsL', 'path to dsR'},'Type','tall')
3 Commenti
Atsushi Ueno
il 9 Mar 2022
>上記と同じimdsを作成することは可能でしょうか
CombinedDatastore オブジェクトは複数のimdsを纏めた物で各imdsの中身迄は融合されません
だから、質問の答えはNOですね。
Più risposte (0)
Vedere anche
Categorie
Scopri di più su 大規模なイメージ ファイル in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!