对不等维图像重新采样
Resampling an image of Unequal Dimensions
我有一张尺寸为 (182 x 218 x 182) 的 3d 图像。
如何在 MATLAB 中将此图像下采样为相同尺寸的图像(如 128 x 128 x 128)?
试试这个:
im=rand(2,3,4); %%% input image
ny=3;nx=3;nz=5; %% desired output dimensions
[y x z]=...
ndgrid(linspace(1,size(im,1),ny),...
linspace(1,size(im,2),nx),...
linspace(1,size(im,3),nz));
imOut=interp3(im,x,y,z);
我从 resizing 3D matrix (image) in MATLAB
那里偷了这个答案
我有一张尺寸为 (182 x 218 x 182) 的 3d 图像。
如何在 MATLAB 中将此图像下采样为相同尺寸的图像(如 128 x 128 x 128)?
试试这个:
im=rand(2,3,4); %%% input image
ny=3;nx=3;nz=5; %% desired output dimensions
[y x z]=...
ndgrid(linspace(1,size(im,1),ny),...
linspace(1,size(im,2),nx),...
linspace(1,size(im,3),nz));
imOut=interp3(im,x,y,z);
我从 resizing 3D matrix (image) in MATLAB
那里偷了这个答案