matlab图像处理程序Word格式文档下载.docx
《matlab图像处理程序Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《matlab图像处理程序Word格式文档下载.docx(9页珍藏版)》请在冰点文库上搜索。
![matlab图像处理程序Word格式文档下载.docx](https://file1.bingdoc.com/fileroot1/2023-5/6/9967a00a-dc03-4483-a19b-b72d13012013/9967a00a-dc03-4483-a19b-b72d130120131.gif)
%stop.Allinputsarepassedtolee_OpeningFcnviavarargin.
%*SeeGUIOptionsonGUIDE'
sToolsmenu.Choose"
GUIallowsonlyone
%instancetorun(singleton)"
.
%Seealso:
GUIDE,GUIDATA,GUIHANDLES
%Edittheabovetexttomodifytheresponsetohelplee
%LastModifiedbyGUIDEv2.502-Sep-201212:
36:
56
%Begininitializationcode-DONOTEDIT
gui_Singleton=1;
gui_State=struct('
gui_Name'
mfilename,...
'
gui_Singleton'
gui_Singleton,...
gui_OpeningFcn'
@lee_OpeningFcn,...
gui_OutputFcn'
@lee_OutputFcn,...
gui_LayoutFcn'
[],...
gui_Callback'
[]);
ifnargin&
&
ischar(varargin{1})
gui_State.gui_Callback=str2func(varargin{1});
end
ifnargout
[varargout{1:
nargout}]=gui_mainfcn(gui_State,varargin{:
});
else
gui_mainfcn(gui_State,varargin{:
%Endinitializationcode-DONOTEDIT
%---Executesjustbeforeleeismadevisible.
functionlee_OpeningFcn(hObject,eventdata,handles,varargin)
%Thisfunctionhasnooutputargs,seeOutputFcn.
%hObjecthandletofigure
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
%varargincommandlineargumentstolee(seeVARARGIN)
%Choosedefaultcommandlineoutputforlee
handles.output=hObject;
%Updatehandlesstructure
guidata(hObject,handles);
%UIWAITmakesleewaitforuserresponse(seeUIRESUME)
%uiwait(handles.figure1);
%---Outputsfromthisfunctionarereturnedtothecommandline.
functionvarargout=lee_OutputFcn(hObject,eventdata,handles)
%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);
%Getdefaultcommandlineoutputfromhandlesstructure
varargout{1}=handles.output;
%---Executesonbuttonpressinpushbutton1.
functionpushbutton1_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton1(seeGCBO)
globalim1str;
[filename,pathname]=...
uigetfile({'
*.jpg'
;
'
*.bmp'
*.png'
*.gif'
},'
选择图片'
);
str=[pathname,filename];
im1=imread(str);
axes(handles.axes1);
imshow(im1);
%---Executesonbuttonpressinpushbutton2.
functionpushbutton2_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton2(seeGCBO)
%---Executesonbuttonpressinpushbutton3.
functionpushbutton3_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton3(seeGCBO)
%---Executesonbuttonpressinpushbutton4.
functionpushbutton4_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton4(seeGCBO)
%---Executesonbuttonpressinpushbutton5.
functionpushbutton5_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton5(seeGCBO)
globalim1;
im2=im1;
%im2=im2bw(im2,0.5);
[No_dither,map]=rgb2ind(im2,8,'
nodither'
axes(handles.axes2);
imshow(No_dither,map);
%imshow(im2);
%---Executesonbuttonpressinpushbutton6.
functionpushbutton6_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton6(seeGCBO)
im3=im2bw(im2,0.7);
im5=im2bw(im2,0.3);
mov1=cat(2,im3,im3);
mov2=cat(2,im5,im5);
mov3=cat(1,mov1,mov2);
imshow(mov3);
%---Executesonbuttonpressinpushbutton7.
functionpushbutton7_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton7(seeGCBO)
%[im3,map]=rgb2ind(im2,128);
%mov=immovie(im3,map);
%axes(handles.axes2);
%movie(mov,1);
mri=uint8(zeros(128,128,1,27));
forframe=1:
27
[mri(:
:
frame),map]=imread('
mri.tif'
frame);
mov=immovie(mri,map);
figure;
movie(mov);
%---Executesonbuttonpressinpushbutton8.
functionpushbutton8_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton8(seeGCBO)
clearall;
close(gcf);
%---Executesonbuttonpressinpushbutton9.
functionpushbutton9_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton9(seeGCBO)
montage(mri,map);
%---Executesonbuttonpressinpushbutton10.
functionpushbutton10_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton10(seeGCBO)
[x,y,z]=sphere;
warp(x,y,z,im2);
%---Executesonbuttonpressinpushbutton12.
functionpushbutton12_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton12(seeGCBO)
im2=imrotate(im2,60,'
bilinear'
imshow(im2);
%---Executesonbuttonpressinpushbutton16.
functionpushbutton16_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton16(seeGCBO)
im3=imcrop;
imshow(im3);
%---Executesonbuttonpressinpushbutton17.
functionpushbutton17_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton17(seeGCBO)
im2=imread('
tire.tif'
f=inline('
max(x(:
))'
im3=nlfilter(im2,[3,3],f);
%---Executesonbuttonpressinpushbutton18.
functionpushbutton18_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton18(seeGCBO)
im2=im2bw(im2);
%im2=imread('
pout.tif'
BW=roipoly;
h=fspecial('
unsharp'
im3=roifilt2(h,im2,BW);
%---Executesonbuttonpressinpushbutton19.
functionpushbutton19_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton19(seeGCBO)
im2=rgb2gray(im2);
%im3=ind2gray(X,map);
im3=roifill;
%---Executesonbuttonpressinpushbutton20.
functionpushbutton20_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton20(seeGCBO)
%im2=mat2gray(im2);
im3=edge(im2);