image_resize.m

来自「这是一个去马赛克工具软件」· M 代码 · 共 12 行

M
12
字号
function I=image_resize(filename,S)
%This functions loads the image in the filename and resizes its biggest
%dimension to the size given in S, using the bilinear method.

I=imread(filename);
[imx,imy,imz]=size(I);
if imx>imy
    I=imresize(I,S/imx,'bilinear');
else
    I=imresize(I,S/imy,'bilinear');
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?