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

Réponse acceptée
Plus de réponses (2)
Jiro Doke
le 12 Sep 2017
セル配列 mydata に複数の画像データが入っているので、通常のインデックスでそれぞれ取り出せます。
1つ目の画像: mydata{1}
つまり、1つ目の画像を表示したい場合は
imshow(mydata{1})
Kei Otsuka
le 12 Sep 2017
画像データが大量にある場合はimageDatestoreも便利です。
imds = imageDatastore('ディレクトリ名');
1,3,5枚目の画像表示
helperDisplayImageMontage(imds.Files(1:2:5));
Catégories
En savoir plus sur データ ストア dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!