<span style="font-family: Arial, Helvetica, sans-serif;">添加按钮 作用:选择图片并且可以退出</span>
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global im
%选择图片路径
[filename,pathname] = ...
uigetfile(['*.jpg'],'选择图片');
%合成路径
str=[pathname filename];
%读取图片
im=imread(str);
%使用第一个axes
axes(handles.axes1);
%显示图片
<pre><span style="font-size:18px;">imshow</span>(im);
function uipanel1_SelectionChangeFcn(hObject, eventdata, handles)
% hObject handle to the selected object in uipanel1
% eventdata structure with the following fields (see UIBUTTONGROUP)
% EventName: string 'Sele
matlab_GUI_2 radiobutton
最新推荐文章于 2024-01-16 17:09:12 发布
这篇博客介绍了如何在MATLAB GUI中通过选择不同的边缘检测算法(如Sobel、Prewitt、Canny)来处理图片,并展示处理过程。用户可以选择图片并实时查看处理结果。
摘要由CSDN通过智能技术生成