matlab毕业编程谷速软件图像匹配Word下载.docx

上传人:b****6 文档编号:20526443 上传时间:2023-01-23 格式:DOCX 页数:11 大小:16.76KB
下载 相关 举报
matlab毕业编程谷速软件图像匹配Word下载.docx_第1页
第1页 / 共11页
matlab毕业编程谷速软件图像匹配Word下载.docx_第2页
第2页 / 共11页
matlab毕业编程谷速软件图像匹配Word下载.docx_第3页
第3页 / 共11页
matlab毕业编程谷速软件图像匹配Word下载.docx_第4页
第4页 / 共11页
matlab毕业编程谷速软件图像匹配Word下载.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

matlab毕业编程谷速软件图像匹配Word下载.docx

《matlab毕业编程谷速软件图像匹配Word下载.docx》由会员分享,可在线阅读,更多相关《matlab毕业编程谷速软件图像匹配Word下载.docx(11页珍藏版)》请在冰豆网上搜索。

matlab毕业编程谷速软件图像匹配Word下载.docx

sToolsmenu.Choose"

GUIallowsonlyone

%instancetorun(singleton)"

.

%Seealso:

GUIDE,GUIDATA,GUIHANDLES

%Copyright2002-2003TheMathWorks,Inc.

%Edittheabovetexttomodifytheresponsetohelppush

%LastModifiedbyGUIDEv2.521-Nov-200811:

43:

53

%Begininitializationcode-DONOTTARGET

gui_Singleton=1;

gui_State=struct('

gui_Name'

mfilename,...

'

gui_Singleton'

gui_Singleton,...

gui_OpeningFcn'

@push_OpeningFcn,...

gui_OutputFcn'

@push_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-DONOTTARGET

%---Executesjustbeforepushismadevisible.

functionpush_OpeningFcn(hObject,eventdata,handles,varargin)

%Thisfunctionhasnooutputargs,seeOutputFcn.

%hObjecthandletofigure

%eventdatareserved-tobedefinedinafutureversionofMATLAB

%handlesstructurewithhandlesanduserdata(seeGUIDATA)

%varargincommandlineargumentstopush(seeVARARGIN)

%Choosedefaultcommandlineoutputforpush

handles.pic='

test1.jpg'

;

handles.output=hObject;

%Updatehandlesstructure

guidata(hObject,handles);

%UIWAITmakespushwaitforuserresponse(seeUIRESUME)

%uiwait(handles.figure1);

%---Outputsfromthisfunctionarereturnedtothecommandline.

functionvarargout=push_OutputFcn(hObject,eventdata,handles)

%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);

%Getdefaultcommandlineoutputfromhandlesstructure

varargout{1}=handles.output;

%---Executesonbuttonpressinpushbutton1.

functionpushbutton1_Callback(hObject,eventdata,handles)

%hObjecthandletopushbutton1(seeGCBO)

%set(handles.text1,'

String'

'

pushbuttonpushed'

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%FunctionDevelopedbyFahdA.Abbasi.

%DepartmentofElectricalandElectronicsEngineering,Universityof

%EngineeringandTechnology,Taxila,PAKISTAN.

%Thefunctiontakestwoimagesasargumentandusingedgedetection

%checkswhethertheyarethesameornot...acoolandsimplecodewhich

%canbeusedinsecuritysystems.

%Thelevelatwhichthetwopicturesshouldbematchedcanbecontrolled

%bychangingthecodeatline100.

%USAGE(SAMPLECODE)

%pic1=imread('

cameraman.tif'

);

%pic2=imread('

%ait_picmatch(pic1,pic2);

%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%functionpattmatch(k,p)

display('

anish'

k=handles.XX;

p=handles.YY;

[x,y,z]=size(k);

if(z==1)

;

k=rgb2gray(k);

[x,y,z]=size(p);

p=rgb2gray(p);

%applyingedgedetectiononfirstpicture

%sothatweobtainwhiteandblackpointsandedgesoftheobjectspresent

%inthepicture.

edge_det_k=edge(k,'

prewitt'

%%applyingedgedetectiononsecondpicture

edge_det_p=edge(p,'

%definitionofdifferentvariablestobeusedinthecodebelow

%outputvariableifpictureshavebeenmatched.

OUTPUT_MESSAGE='

almostsamex-rayimages'

%outputvariableifobjectsinthewholepicturehavenotbeenmatched.

OUTPUT_MESSAGE2='

x-rayimagesnotmatching'

%initializationofdifferentvariablesused

matched_data=0;

white_points=0;

black_points=0;

x=0;

y=0;

l=0;

m=0;

%forloopusedfordetectingblackandwhitepointsinthepicture.

fora=1:

1:

300

forb=1:

if(edge_det_k(a,b)==1)

white_points=white_points+1;

else

black_points=black_points+1;

end

testing'

%forloopcomparingthewhite(edgepoints)inthetwopictures

fori=1:

forj=1:

if(edge_det_k(i,j)==1)&

(edge_det_p(i,j)==1)

matched_data=matched_data+1;

%calculatingpercentagematching.

total_data=white_points;

total_matched_percentage=(matched_data/total_data)*100;

%handles.pp=total_matched_percentage;

%guidata(hObject,handles);

set(handles.result,'

total_matched_percentage);

%outputtingtheresultofthesystem.

if(total_matched_percentage>

=85)%canaddflexabilityatthispointbyreducingtheamountofmatching.

total_matched_percentage

OUTPUT_MESSAGE

display(OUTPUT_MESSAGE);

set(handles.result1,'

OUTPUT_MESSAGE);

OUTPUT_MESSAGE2

display(OUTPUT_MESSAGE2);

OUTPUT_MESSAGE2);

%---Executesduringobjectcreation,aftersettingallproperties.

functiontext1_CreateFcn(hObject,eventdata,handles)

%hObjecthandletotext1(seeGCBO)

%handlesempty-handlesnotcreateduntilafterallCreateFcnscalled

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

functionsource_Callback(hObject,eventdata,handles)

%hObjecthandletosource(seeGCBO)

file=uigetfile('

*.jpg'

if~isequal(file,0)

k=imread(file);

handles.YY=k;

z=k;

guidata(hObject,handles);

subplot(2,2,1),imshow(k);

title('

source'

functionnew_Callback(hObject,eventdata,handles)

%hObjecthandletonew(seeGCBO)

functiontarget_Callback(hObject,eventdata,handles)

%hObjecthandletotarget(seeGCBO)

p=imread(file);

subplot(2,2,2),imshow(p);

target'

handles.XX=p;

functionUntitled_2_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_2(seeGCBO)

functionUntitled_1_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_1(seeGCBO)

functionabout_Callback(hObject,eventdata,handles)

%hObjecthandletoabout(seeGCBO)

msgbox('

codedbyANISHFRANCIS,lecturer,ECEDEPT'

functionUntitled_5_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_5(seeGCBO)

functionUntitled_6_Callback(hObject,eventdata,handles)

%hObjecthandletoUntitled_6(seeGCBO)

functionhowto_Callback(hObject,eventdata,handles)

%hObjecthandletohowto(seeGCBO)

usemediumsizedimages'

functionfigure1_CreateFcn(hObject,eventdata,handles)

%hObjecthandletofigure1(seeGCBO)

functionopen_Callback(hObject,eventdata,handles)

%hObjecthandletoopen(seeGCBO)

%handlesstr

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

当前位置:首页 > 小学教育 > 英语

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1