Can I get a 3D array from an image folder

8 ビュー (過去 30 日間)
Nicholas Petzinna
Nicholas Petzinna 2021 年 7 月 9 日
コメント済み: Nicholas Petzinna 2021 年 7 月 9 日
My problem is that I have a folder with 919 images that are basically frames which are sized at 938x512.
I know that I can load an individual picture with imread and receive the 2D array but is there a way to read in all the pictures to end up with an array that looks like this 919x938x512?
Thank you very much for you time.

採用された回答

KSSV
KSSV 2021 年 7 月 9 日
img = dir('*.jpg') ; % give you image extensions
n = length(img) ;
I = zeros(n,938,512) ;
for i = 1:n
T = imread(img(i).name) ;
I(i,:,:) = T ;
end
  1 件のコメント
Nicholas Petzinna
Nicholas Petzinna 2021 年 7 月 9 日
Thank you very much, it works.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRead, Write, and Modify Image についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by