Error in resizing 3d image
古いコメントを表示
I have a dataset of 3d images containing 30 images of different sizes,I want to resize all images to a paricular size
for example for 2d if we use imresize(I,[25 256]) all images in dataset will be resized
same way i tried for 3d using
J = resize(I,size(I).*[0.3 0.3 1])
but it is not reduced to a particular size,i need all images to have same size
say 256x256x3
please help
採用された回答
その他の回答 (1 件)
Andrei Bobrov
2012 年 8 月 29 日
編集済み: Andrei Bobrov
2012 年 8 月 29 日
try this code
A = randi(255,89,300,3,'uint8'); % eg first image
B = randi(255,100,200,3,'uint8'); % eg second image
AA = {A,B};
out = cellfun(@(x)imresize(x,[256 256]),AA,'un',0);
3 件のコメント
kash
2012 年 8 月 29 日
Andrei Bobrov
2012 年 8 月 29 日
編集済み: Andrei Bobrov
2012 年 8 月 29 日
just for one image, my variant in answer for multiple image
D=imread('peppers.png');
out = imresize(D,[256 256]);
kash
2012 年 8 月 29 日
カテゴリ
ヘルプ センター および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!