イメージサイズ

5 Ansichten (letzte 30 Tage)
大空
大空 am 21 Jul. 2022
Kommentiert: Hernia Baby am 4 Aug. 2022
イメージサイズを(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);

Akzeptierte Antwort

Hernia Baby
Hernia Baby am 21 Jul. 2022
augmentedImageDatastoreで可能なはずです
グレースケールにしたい場合はColorPreprocessingをご参考ください
auds = augmentedImageDatastore([256 256],imds,'ColorPreprocessing','rgb2gray')
  3 Kommentare
大空
大空 am 4 Aug. 2022
ごめんなさい最初行ったのですが上手くいかず再度行ったら上手くいきました。
ありがとうございます
Hernia Baby
Hernia Baby am 4 Aug. 2022
うまくいったようでよかったです。もし、ダメだった場合はコメント頂けると再検討しますので遠慮なくどうぞ。

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!