Ältere Kommentare anzeigen
初歩的な質問で申し訳ありません。 下のコードのように複数画像を一度に読み込んで、後から任意数の画像を指定して使用する場合には、コードはどのようにすればよいでしょうか?(例えば、1,3,5枚目の画像を表示する場合など)imshowなどの関数は使えないのでしょうか?

Akzeptierte Antwort
Weitere Antworten (2)
Jiro Doke
am 12 Sep. 2017
セル配列 mydata に複数の画像データが入っているので、通常のインデックスでそれぞれ取り出せます。
1つ目の画像: mydata{1}
つまり、1つ目の画像を表示したい場合は
imshow(mydata{1})
Kei Otsuka
am 12 Sep. 2017
画像データが大量にある場合はimageDatestoreも便利です。
imds = imageDatastore('ディレクトリ名');
1,3,5枚目の画像表示
helperDisplayImageMontage(imds.Files(1:2:5));
Kategorien
Mehr zu データ ストア finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!