weixin_48351430
weixin_48351430
采纳率100%
2020-06-03 15:03 阅读 238

matlab中运用GUI的菜单来编写另存为函数

1.保存类型:图片如png、jpg、bmp等格式
2.图片说明 保存的代码已用imwrite写了,问题在于另存为的代码如何编写。
保存代码:

function savenoise_Callback(hObject, eventdata, handles)
% hObject    handle to savenoise (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global Y;%Y为加噪后的图像文件
imwrite(Y,'noise.jpg','jpg');

% --------------------------------------------------------------------
function savefiter_Callback(hObject, eventdata, handles)
% hObject    handle to savefiter (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

global Z;%Z为滤波后图像文件
imwrite(Z,'filter.jpg','jpg');

有没有大佬能帮忙弄出个另存为代码,要求可以选择保存文件路径与保存的图像类型

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

相关推荐