Show older comments
画像(1000枚)の輝度値を要素とした三次元行列を作成したいです。
cat関数を用いて、画像を三次元に拡張しようと考えたのですが時間がかかります。
もっと早く作成する方法はありますか?
gray スケールの画像1000枚をfor構文とcat関数を用いて一枚ずつ三次元方向にくっつけています。
Accepted Answer
More Answers (1)
madhan ravi
on 22 Jul 2020
Edited: madhan ravi
on 22 Jul 2020
I = num2cell(Images);
W = cat(3, I{:});
2 Comments
shunya hara
on 22 Jul 2020
madhan ravi
on 22 Jul 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{:});
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!