matlab实现改变指定图像的尺寸,然后存储到指定的文件夹

clear;
clc;
[filename,pathname]=uigetfile('*','choose a picture');
path=[pathname,filename];
Origimg=imread(path);
img=imresize(Origimg,[480 640]);%改变图像尺寸的大小为480*640
%设定存储的文件夹
path='E:\Code\CodeByMe\savaPicture';
pathfile=fullfile(path,filename);
imwrite(img,pathfile,'jpg');

猜你喜欢

转载自blog.csdn.net/feelingjun/article/details/53262058
今日推荐