How to change image size from 224 x 224 x 1 to 224 x 224 x 3
古いコメントを表示
i have images with 224 x 224 x 1 size i want to convert it to 224 x 224 x 3
採用された回答
その他の回答 (1 件)
Walter Roberson
2022 年 11 月 4 日
0 投票
I recommend that you consider using an imageDatastore followed by an augmentedImageDatastore -- the augmented store can automatically resize your images and can automatically convert to RGB or grayscale.
2 件のコメント
Rev
2023 年 12 月 7 日
How do you do that?
Walter Roberson
2023 年 12 月 7 日
unzip('MerchData.zip');
imds = imageDatastore('MerchData', ...
'IncludeSubfolders',true, ...
'LabelSource','foldernames');
augds = augmentedImageDatastore([224 224], imds, 'ColorPreprocessing', 'gray2rgb');
[imdsTrain,imdsValidation] = splitEachLabel(augds,0.7);
and so on.
カテゴリ
ヘルプ センター および File Exchange で Convert Image Type についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

