数字图像处理matlabGUI处理包.docx

上传人:b****6 文档编号:15663727 上传时间:2023-07-06 格式:DOCX 页数:24 大小:18.29KB
下载 相关 举报
数字图像处理matlabGUI处理包.docx_第1页
第1页 / 共24页
数字图像处理matlabGUI处理包.docx_第2页
第2页 / 共24页
数字图像处理matlabGUI处理包.docx_第3页
第3页 / 共24页
数字图像处理matlabGUI处理包.docx_第4页
第4页 / 共24页
数字图像处理matlabGUI处理包.docx_第5页
第5页 / 共24页
数字图像处理matlabGUI处理包.docx_第6页
第6页 / 共24页
数字图像处理matlabGUI处理包.docx_第7页
第7页 / 共24页
数字图像处理matlabGUI处理包.docx_第8页
第8页 / 共24页
数字图像处理matlabGUI处理包.docx_第9页
第9页 / 共24页
数字图像处理matlabGUI处理包.docx_第10页
第10页 / 共24页
数字图像处理matlabGUI处理包.docx_第11页
第11页 / 共24页
数字图像处理matlabGUI处理包.docx_第12页
第12页 / 共24页
数字图像处理matlabGUI处理包.docx_第13页
第13页 / 共24页
数字图像处理matlabGUI处理包.docx_第14页
第14页 / 共24页
数字图像处理matlabGUI处理包.docx_第15页
第15页 / 共24页
数字图像处理matlabGUI处理包.docx_第16页
第16页 / 共24页
数字图像处理matlabGUI处理包.docx_第17页
第17页 / 共24页
数字图像处理matlabGUI处理包.docx_第18页
第18页 / 共24页
数字图像处理matlabGUI处理包.docx_第19页
第19页 / 共24页
数字图像处理matlabGUI处理包.docx_第20页
第20页 / 共24页
亲,该文档总共24页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

数字图像处理matlabGUI处理包.docx

《数字图像处理matlabGUI处理包.docx》由会员分享,可在线阅读,更多相关《数字图像处理matlabGUI处理包.docx(24页珍藏版)》请在冰点文库上搜索。

数字图像处理matlabGUI处理包.docx

数字图像处理matlabGUI处理包

functionvarargout=digital_image_processing(varargin)

%DIGITAL_IMAGE_PROCESSINGMATLABcodefordigital_image_processing.fig

%DIGITAL_IMAGE_PROCESSING,byitself,createsanewDIGITAL_IMAGE_PROCESSINGorraisestheexisting

%singleton*.

%

%H=DIGITAL_IMAGE_PROCESSINGreturnsthehandletoanewDIGITAL_IMAGE_PROCESSINGorthehandleto

%theexistingsingleton*.

%

%DIGITAL_IMAGE_PROCESSING('CALLBACK',hObject,eventData,handles,...)callsthelocal

%functionnamedCALLBACKinDIGITAL_IMAGE_PROCESSING.Mwiththegiveninputarguments.

%

%DIGITAL_IMAGE_PROCESSING('Property','Value',...)createsanewDIGITAL_IMAGE_PROCESSINGorraisesthe

%existingsingleton*.Startingfromtheleft,propertyvaluepairsare

%appliedtotheGUIbeforedigital_image_processing_OpeningFcngetscalled.An

%unrecognizedpropertynameorinvalidvaluemakespropertyapplication

%stop.Allinputsarepassedtodigital_image_processing_OpeningFcnviavarargin.

%

%*SeeGUIOptionsonGUIDE'sToolsmenu.Choose"GUIallowsonlyone

%instancetorun(singleton)".

%

%Seealso:

GUIDE,GUIDATA,GUIHANDLES

%Edittheabovetexttomodifytheresponsetohelpdigital_image_processing

%LastModifiedbyGUIDEv2.521-Nov-201714:

07:

42

%Begininitializationcode-DONOTEDIT

gui_Singleton=1;

gui_State=struct('gui_Name',mfilename,...

'gui_Singleton',gui_Singleton,...

'gui_OpeningFcn',@digital_image_processing_OpeningFcn,...

'gui_OutputFcn',@digital_image_processing_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{:

});

end

%Endinitializationcode-DONOTEDIT

%---Executesjustbeforedigital_image_processingismadevisible.

functiondigital_image_processing_OpeningFcn(hObject,eventdata,handles,varargin)

%Thisfunctionhasnooutputargs,seeOutputFcn.

%hObjecthandletofigure

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%varargincommandlineargumentstodigital_image_processing(seeVARARGIN)

%Choosedefaultcommandlineoutputfordigital_image_processing

handles.output=hObject;

%Updatehandlesstructure

guidata(hObject,handles);

%UIWAITmakesdigital_image_processingwaitforuserresponse(seeUIRESUME)

%uiwait(handles.figure1);

%---Outputsfromthisfunctionarereturnedtothecommandline.

functionvarargout=digital_image_processing_OutputFcn(hObject,eventdata,handles)

%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);

%hObjecthandletofigure

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%Getdefaultcommandlineoutputfromhandlesstructure

varargout{1}=handles.output;

%---Executesonselectionchangeinpopupmenu1.

functionpopupmenu1_Callback(hObject,eventdata,handles)

%hObjecthandletopopupmenu1(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%Hints:

contents=cellstr(get(hObject,'String'))returnspopupmenu1contentsascellarray

%contents{get(hObject,'Value')}returnsselecteditemfrompopupmenu1

%---Executesduringobjctcreation,aftersettingallproperties.

functionpopupmenu1_CreateFcn(hObject,eventdata,handles)

%hObjecthandletopopupmenu1(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled

%Hint:

popupmenucontrolsusuallyhaveawhitebackgroundonWindows.

%SeeISPCandCOMPUTER.

ifispc&&isequal(get(hObject,'BackgroundColor'),get(0,'defaultUicontrolBackgroundColor'))

set(hObject,'BackgroundColor','white');

end

%--------------------------------------------------------------------

functionUntitled_1_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_1(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%-------------------------------------------------------------------

functionUntitled_3_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_3(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%--------------------------------------------------------------------

functionUntitled_14_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_14(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%--------------------------------------------------------------------

functionUntitled_25_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_25(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%--------------------------------------------------------------------

functionUntitled_29_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_29(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%--------------------------------------------------------------------

functionUntitled_32_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_32(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%--------------------------------------------------------------------

functionUntitled_33_Callback(hObject,eventdata,handles)

%ÇøÓòÂ˲¨

%hObjecthandletoUntitled_33(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

I=handles.img;

c=[222272300270221194];

r=[21217512112175];

BW=roipoly(I,c,r);

H=fspecial('unsharp');

J=roifilt2(H,I,BW);

figure,imshow(I);

figure,imshow(J);

handles.img=I;

guidata(hObject,handles);

%--------------------------------------------------------------------

functionUntitled_34_Callback(hObject,eventdata,handles)

%ÇøÓòÌî³äÖ®ºóµÄͼÏñ

%hObjecthandletoUntitled_34(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

I=handles.img;

c=[222272300270221194];

r=[21217512112175];

J=roifill(I,c,r);

figure,imshow(I);

title('ÔʼͼÏñ');

figure,imshow(J);

title('ÇøÓòÌî³äÖ®ºóµÄͼÏñ');

handles.img=I;

guidata(hObject,handles);

%--------------------------------------------------------------------

%¸µÀïÒ¶±ä»»

functionUntitled_30_Callback(~,eventdata,handles)

%hObjecthandletoUntitled_30(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%f=zeros(30,30);

%f(5:

24,13:

17)=1;

%axes(handles.dispaly1);

%imshow(f,'InitialMagnification','fit');

%imwrite(f,'file.jpg');

f=handles.img;

F=fft2(f,256,256);

F1=fftshift(F);

F2=log(abs(F1));

axes(handles.display2);

imshow(F2,[]),title('¸µÀïÒ¶±ä»»·ù¶ÈƵÆ×');

handles.img=img;

guidata(hObject,handles);

%--------------------------------------------------------------------

functionUntitled_31_Callback(hObject,eventdata,handles)

%ÓàÏұ任

%hObjecthandletoUntitled_31(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

RGB=handles.img;

%I=rgb2gray(RGB);

J=dct2(RGB);

figure;

imshow(log(abs(J)),[]);

title('DCT±ä»»»Ò¶ÈͼÏñ');

colormap(gray(4));

colorbar

J(abs(J)<0.01)=0;

K=idct2(J);

axes(handles.display2);

imshow(K);

title('¾¹ýDCT±ä»»£¬È»ºóÄæ±ä»»µÄ»Ò¶ÈͼÏñ');

handles.img=RGB;

guidata(hObject,handles);

%--------------------------------------------------------------------

%ÏßÐÔÂ˲¨

functionUntitled_26_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_26(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

I=handles.img;

J=imnoise(I,'salt&pepper',0.02);

figure,imshow(J);

K=filter2(fspecial('average',3),J)/255;

figure,imshow(K);

title('¾ùÖµÂ˲¨Æ÷');

handles.img=I;

guidata(hObject,handles);

%--------------------------------------------------------------------

%ÖÐÖµÂ˲¨

functionUntitled_27_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_27(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

I=handles.img;

J=imnoise(I,'salt&pepper',0.02);

figure,imshow(J);

L=medfilt2(J,[33]);

figure,imshow(L);

title('ÖÐÖµÂ˲¨¶ÔÂ˳ýͼÏñµÄ½·ÑÎÔëÉù·Ç³£ÓÐЧ');

handles.img=I;

guidata(hObject,handles);

%--------------------------------------------------------------------

%×ÔÊÊÓ¦Â˲¨

functionUntitled_28_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_28(seeGCBO)

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

I=handles.img;

J=imnoise(I,'gaussian',0,0.025);

figure,imshow(J);

L=wiener2(J,[55]);

figure,imshow(L);

title('×ÔÊÊÓ¦Â˲¨¶Ôº¬Óиß˹ÔëÉùµÄͼÏñÂ˲¨Ð§¹û½ÏºÃ');

handles.img=I;

guidata(hObject,handles);

%----------------------------------------------

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2