dicomファイルのリサイズについて
古いコメントを表示
Alexnet、Googlenetを利用するために
256*256*1のdicomファイルを257*257*3にリサイズしようとしております。
以下がコードです。
%path = current directory
currentdirectory = pwd;
%% Create an ImageDatastore to help you manage the data.currentdirectory = pwd;
categories = {'a', 'b', 'c','d'};
%Because ImageDatastore operates on image file locations,
imds = imageDatastore(fullfile(currentdirectory, categories),'IncludeSubfolders',true,'FileExtensions','.dcm','LabelSource', 'foldernames','ReadFcn');
%resize
imdsResized = imresize3(imds, [227 227 3]);
しかし、以下のエラーが出てしまいます。
Error using imresize3
Expected input number 1, V, to be one of these types:
single, double, int8, int16, int32, uint8, uint16, uint32
Instead its type was matlab.io.datastore.ImageDatastore.
原因がお分かりの方はご教示頂けますと幸いです。
どうぞよろしくお願いいたします。
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で ファイルからのイメージ データの読み取りと書き込み についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!