functionbackswitch_Callback(hObject, eventdata, handles)% hObject handle to backswitch(see GCBO)% eventdata reserved - to be defined in a future version ofMATLAB% handles structure with handles and user data(see GUIDATA)
ha =axes('units','normalized','position',[0011]);uistack(ha,'down')[fname, pname, index]=uigetfile({
'*.jpg; *.bmp'},'选择背景图片');if index
II=imread([pname,fname]);image(II)
colormap gray
set(ha,'handlevisibility','off','visible','off');elseerrordlg('选择背景失败');%提示错误对话框
hDialog =findall(0,'tag','Msgbox_Error Dialog');
btn_ok =findall(hDialog,'style','pushbutton');set(btn_ok,'String','确定');
end