イメージサイズを(256 256 1)にしたいのですが
256 256 3になっているみたいなのですがどこを変更すればよろしいでしょうか?
imds = imageDatastore('sindou','IncludeSubfolders',true,'LabelSource','foldernames');
labelCount = countEachLabel(imds)
%% データで振り分ける
rateTrainFiles = 0.6;
[imdsTrain,imdsValidation] = splitEachLabel(imds,rateTrainFiles,'randomize');
s_image = [256 256 1];
audsTrain = augmentedImageDatastore(s_image,imdsTrain);
audsValidation = augmentedImageDatastore(s_image,imdsValidation);

 採用された回答

Hernia Baby
Hernia Baby 2022 年 7 月 21 日

1 投票

augmentedImageDatastoreで可能なはずです
グレースケールにしたい場合はColorPreprocessingをご参考ください
auds = augmentedImageDatastore([256 256],imds,'ColorPreprocessing','rgb2gray')

3 件のコメント

Atsushi Ueno
Atsushi Ueno 2022 年 8 月 3 日
この回答で良いと思ったのですが同じ質問を繰り返していますね。
どこが問題なのでしょう?
大空
大空 2022 年 8 月 4 日
ごめんなさい最初行ったのですが上手くいかず再度行ったら上手くいきました。
ありがとうございます
Hernia Baby
Hernia Baby 2022 年 8 月 4 日
うまくいったようでよかったです。もし、ダメだった場合はコメント頂けると再検討しますので遠慮なくどうぞ。

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImage Processing and Computer Vision についてさらに検索

製品

リリース

R2022a

質問済み:

2022 年 7 月 21 日

コメント済み:

2022 年 8 月 4 日

Community Treasure Hunt

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

Start Hunting!