画像データセットを4-D doubleに変換する方法
11 views (last 30 days)
Show older comments
回帰用の畳み込みニューラル ネットワークの学習
を自分の画像データセットで行いたいのですが,
画像データセットを4-D doubleに変換する方法がわかりません.
どなたかご教示お願い致します.
0 Comments
Accepted Answer
Kenta
on 14 Aug 2019
% 自分の取り込みたいサイズに合わせてDを作成
D=zeros(135,198,3,10);
for i=1:10
% 積み重ねていきたい画像を読み込んでいく(通常は下のように同一のものは読まない)
I=imread('onion.png');
% Dのi番目の画像として格納
D(:,:,:,i)=I;
end
例えばこのようにすれば可能です。Iは同一の画像を読み込んでしまっていますが、実際の場合は、順次対象のデータセットから読んでいけばよいです。
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!