% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [sfilename ,sfilepath]=uiputfile({'*.jpg';'*.bmp';'*.tif';'*.*'},'±£´æÍ¼ÏñÎļþ','untitled.jpg');
if ~isequal([sfilename,sfilepath],[0,0]) sfilefullname=[sfilepath ,sfilename]; imwrite(handles.img,sfilefullname); else
msgbox('Äã°´ÁËÈ¡Ïû¼ü','±£´æÊ§°Ü'); end
³ÌÐò¹Ø¼ü²¿·Ö£º
ͨ[sfilename ,sfilepath]=uiputfile({'*.jpg';'*.bmp';'*.tif';'*.*'},'±£´æÍ¼ÏñÎļþ','untitled.jpg')Ñ¡ÔñͼÏñÎļþ±£´æµÄ·¾¶Óë¸ñʽ£»È»ºó£¬Í¨¹ýsfilefullname=[sfilepath ,sfilename];
imwrite(handles.img,sfilefullname); ʵÏÖ¶ÔͼÏñµÄ±£´æ¡£
£¨3£©³ÌÐòµÄÍ˳ö¡£
function exit_Callback(hObject, eventdata, handles) % hObject handle to exit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) clc; close all; close(gcf); clear;
4.3¶ÔͼÏñ½øÐÐÈÎÒâµÄÁÁ¶ÈºÍ¶Ô±È¶È±ä»¯µ÷Õû£¬ÏÔʾºÍ¶Ô±È±ä»»Ç°ºóµÄͼÏñ¡£ ÔËÐгÌÐòºó£¬Í¨¹ý¡°±à¼¡±²Ëµ¥Öеġ°³£Óô¦Àí¡±Ñ¡ÖС°ÁÁ¶Èµ÷½Ú¡±
9 / 52
ÔÚÏÔʾ³öÏàÓ¦µÄ¹¦Äܼüºó£¬Í¨¹ýÔØÈë¶ÁȡͼÏñ£¬±È²¢½øÐд¦Àí£¬Ð§¹ûÈçÏ£º ÁÁ¶È´¦Àíǰ£º
ÁÁ¶È´¦Àíºó£º
ʵÏÖ³ÌÐò¶ÎÈçÏ£º
% --- Executes on button press in radiobutton12.
function radiobutton12_Callback(hObject, eventdata, handles) % hObject handle to radiobutton12 (see GCBO)
10 / 52
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hint: get(hObject,'Value') returns toggle state of radiobutton12 global T
axes(handles.axes2); T=getimage;
prompt={'µ÷Õû±¶Êý'}; defans={'1'};
p=inputdlg(prompt,'input',1,defans); p1=str2num(p{1});
y=imadjust(handles.img,[ ], [ ],p1); %ÁÁ¶Èµ÷½Ú imshow(y); handles.img=y;
guidata(hObject,handles);
¶Ô±È¶È´¦Àíǰ£º
¶Ô±È¶È´¦Àíºó£¨ÔöÇ¿3±¶£©£º
11 / 52
¶Ô±È¶È¼õÈõ1.5±¶ºó£º
ʵÏÖ³ÌÐò¶ÎÈçÏ£º
function uipanel10_SelectionChangeFcn(hObject, eventdata, handles) % hObject handle to uipanel10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global T
str=get(hObject,'string'); axes(handles.axes2);
switch str case'ÔöÇ¿' T=getimage;
prompt={'ÊäÈë²ÎÊý:'}; defans={'1'};
p=inputdlg(prompt,'input',1,defans); p1=str2num(p{1});
f=immultiply(handles.img,p1); imshow(f);
12 / 52