イメージサイズ

조회 수: 18 (최근 30일)
大空
大空 2022년 7월 21일
댓글: Hernia Baby 2022년 8월 4일
イメージサイズを(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일
augmentedImageDatastoreで可能なはずです
グレースケールにしたい場合はColorPreprocessingをご参考ください
auds = augmentedImageDatastore([256 256],imds,'ColorPreprocessing','rgb2gray')
  댓글 수: 3
大空
大空 2022년 8월 4일
ごめんなさい最初行ったのですが上手くいかず再度行ったら上手くいきました。
ありがとうございます
Hernia Baby
Hernia Baby 2022년 8월 4일
うまくいったようでよかったです。もし、ダメだった場合はコメント頂けると再検討しますので遠慮なくどうぞ。

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!