Afficher commentaires plus anciens
画像(1000枚)の輝度値を要素とした三次元行列を作成したいです。
cat関数を用いて、画像を三次元に拡張しようと考えたのですが時間がかかります。
もっと早く作成する方法はありますか?
gray スケールの画像1000枚をfor構文とcat関数を用いて一枚ずつ三次元方向にくっつけています。
Réponse acceptée
Plus de réponses (1)
madhan ravi
le 22 Juil 2020
Modifié(e) : madhan ravi
le 22 Juil 2020
I = num2cell(Images);
W = cat(3, I{:});
2 commentaires
shunya hara
le 22 Juil 2020
madhan ravi
le 22 Juil 2020
n = 4 : 1079;
A = cell(numel(n), 1);
for n = n
A{k} = imread(a(n).name);
k = k + 1;
end
W = cat(3, A{:});
Catégories
En savoir plus sur Logical 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!