资源描述:
《数字图像处理实验四、基于guide的图像处理软件开发》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实验四、基于GUIDE的图像处理软件开发(1)学习使用MATLABGUIDE的基本操作。(2)以图像增强为例完成基木图像处理功能的回调函数编写。二、实验主要仪器设备(1)台式机或笔记本电脑。(2)MATLAB软件(含GUIDE开发环境)。三、实验原理(1)基于灰度直方图变换的图像增强。(2)灰度修正图像增强。(3)图像平滑滤波。(4)图像锐化处理。四、实验内容(1)直方图的计算及用直方图均衡原理增强图像。(2)线性灰度变换图像增强。(3)对受椒盐噪声污染的图像采用低通处理模板去燥。(4)对受椒盐噪声污染的图像采用中值滤波去噪。(5)对图像采用梯度算子和拉普拉斯算子进行锐化。五、实验
2、步骤(1)建立开发环境。(2)编写相关回调函数。(3)不断调试、优化,获得较满意的人机交互效果。六.实验程序functionvarargout=test4(varargin)%TEST4MATLABcodefortest4.fig%TEST4,byitself,createsanewTEST4orraisestheexisting%singleton*•%%H=TEST4returnsthehandletoanewTEST4orthehandleto%theexistingsingleton*.%%TEST4(1CALLBACK1,hObject,eventData,handles
3、,•••)callsthelocal%functionnemedCALLBACKinTEST4.Mwiththegiveninputarguments.%%TEST4(1Property1,1Value1,...)createsanewTEST4orraisesthe%existingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforetest4_0peningFcngetscalled.An%unrecognizedpropertynameorinvalidvaluemakesprop
4、ertyapplication%stop.Allinputsarepassedtotest4_0peningFcnviavarargin.%%*SeeGUIOptionsonGUIDE1sToolsmenu.ChoosenGtJIallowsonlyone%instancetorun(singleton)”・%%Seealso:GUIDE,GUIDATA,GUIHANDLES%Edittheabovetexttomodifytheresponsetohelptest4%LastModifiedbyGUIDEv2.530-May-201717:23:54NOTEDITmfilenam
5、e,Begininitializationcode一DOgui_Singleton=1;gui_Stete=struet('gui_Neme',gui_Singleton1,gui_Singleton,1gui_OpeningFcn9f@test4_0peningFcn,@test4_0utputFen,.••[]z[]);1gui_OutputFcn1,1gui_LayoutFcn1,fgui_Callback1,ifnargin&&ischar(varargin{1})gui_State.gui_Callback=str2func(varargin{1});endifnargo
6、ut[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});elsegui_mainfcn(gui_State,varargin{:});end%Endinitializationcode一DONOTEDIT%Executesjustbeforetest4ismadevisib*.functiontest4_0peningFcn(hObject,eventdata,handles,varargin)Thisfunctionhasnooutputargs,seeOutputFen.%Choosedefaultcommandl
7、ineoutputfortest4handles•output=hObject;hObjecthandletofigurereserved一tobedefinedinafutureversionofMATLABhandlesstructurewithhandlesanduserdata(seeGUIDATA)varargincommandlineargumentstotest4(seeVARARGIN)I=ones(256,256);axes(handles•axes