dicomファイルのリサイズについて
Show older comments
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.
原因がお分かりの方はご教示頂けますと幸いです。
どうぞよろしくお願いいたします。
Accepted Answer
More Answers (0)
Categories
Find more on ファイルからのイメージ データの読み取りと書き込み in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!