資源簡介
matlab GUI 實現(xiàn)細(xì)化算法,界面簡潔實用,包含實驗報告,擴展到機器人路徑規(guī)劃問題!

代碼片段和文件信息
%GUI?GUI?GUI?GUI?GUI?GUI?GUI
function?thinning
%?THINING?thining?image?from?the?pop-up?menu?then
%?click?one?of?the?action?push?buttons.?Clicking?the?button
%?read/thining/save?the?selected?data?in?the?axes.
?
???%??Create?and?then?hide?the?GUI?as?it?is?being?constructed.
???f?=?figure(‘Visible‘‘off‘‘Position‘[100300350285]);
?
???%??Construct?the?components.
???htext?=?uicontrol(‘style‘‘text‘‘String‘‘Select?Image‘...
??????????‘Position‘[2252206015]);
???hpopup?=?uicontrol(‘style‘‘popupmenu‘...
??????????‘String‘{‘Number‘‘Chinese?character‘‘English?character‘‘object‘‘Find?path‘}...
??????????‘Position‘[30018010025]...
??????????‘Callback‘{@popup_menu_Callback});
???hsurf?=?uicontrol(‘style‘‘pushbutton‘‘String‘‘Read?image‘...
??????????‘Position‘[3151357025]...
??????????‘Callback‘{@surfbutton_Callback});
???hmesh?=?uicontrol(‘style‘‘pushbutton‘‘String‘‘Thining‘...
??????????‘Position‘[315907025]...
??????????‘Callback‘{@meshbutton_Callback});
???hcontour?=?uicontrol(‘style‘‘pushbutton‘...
??????????‘String‘‘Save‘...
??????????‘Position‘[315507025]...
??????????‘Callback‘{@contourbutton_Callback});?
???ha?=?axes(‘Units‘‘Pixels‘‘Position‘[5060200185]);?
???align([hsurfhmeshhcontourhtexthpopup]‘Center‘‘None‘);
???
???%?Create?the?data?to?plot.
???logo_data=imread(‘logo.bmp‘);
???
???%?Initialize?the?GUI.
???%?Change?units?to?normalized?so?components?resize?
???%?automatically.
???set([fhahsurfhmeshhcontourhtexthpopup]...
???‘Units‘‘normalized‘);
???%Create?a?plot?in?the?axes.
???current_data?=?logo_data;
???save_name=‘Null‘;
???thin_result=current_data;
???imshow(current_data);
???%?Assign?the?GUI?a?name?to?appear?in?the?window?title.
???set(f‘Name‘‘Thinning?GUI‘)
???%?Move?the?GUI?to?the?center?of?the?screen.
???movegui(f‘center‘)
???%?Make?the?GUI?visible.
???set(f‘Visible‘‘on‘);
?
???%??Callbacks?for?simple_gui.?These?callbacks?automatically
???%??have?access?to?component?handles?and?initialized?data?
???%??because?they?are?nested?at?a?lower?level.
?
???%??Pop-up?menu?callback.?Read?the?pop-up?menu?Value?property
???%??to?determine?which?item?is?currently?displayed?and?make?it
???%??the?current?data.
??????function?popup_menu_Callback(sourceeventdata)?
?????????%?Determine?the?selected?data?set.
?????????str?=?get(source?‘String‘);
?????????val?=?get(source‘Value‘);
?????????%?Set?current?data?to?the?selected?data?set.NumberChinese
?????????%?characterEnglish?character
?????????switch?str{val};
?????????case?‘Number‘?%?User?selects?Peaks.
????????????current_data?=?imread(‘sorce_img.bmp‘);
????????????save_name=‘result_sorce_img.tif‘;
?????????case?‘Chinese?character‘?%?User?selects?Membrane.
????????????current_data?=imread(‘thining_chinese.tif‘);
????????????save_name=‘result_thining_chinese.tif‘;
?????????case?‘English?character‘?%?User?selects?Sinc.
????????????current_data?=imread(‘ut
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????97??2011-06-14?00:11??細(xì)化算法GUI實現(xiàn)\project\READ?ME.txt
?????文件??????20540??2011-06-13?16:04??細(xì)化算法GUI實現(xiàn)\project\ob
?????文件??????18188??2011-06-13?21:01??細(xì)化算法GUI實現(xiàn)\project\path.TIF
?????文件?????240054??2010-07-06?11:18??細(xì)化算法GUI實現(xiàn)\project\sorce_img.bmp
?????文件???????5587??2011-06-13?16:38??細(xì)化算法GUI實現(xiàn)\project\thining.asv
?????文件??????17050??2011-06-13?15:52??細(xì)化算法GUI實現(xiàn)\project\thining_chinese.TIF
?????文件???????5797??2011-06-14?00:14??細(xì)化算法GUI實現(xiàn)\project\thinning.m
????..A.SH.?????35840??2011-06-14?00:06??細(xì)化算法GUI實現(xiàn)\project\Thumbs.db
?????文件??????16452??2011-06-13?16:31??細(xì)化算法GUI實現(xiàn)\project\utk.tif
?????文件?????890678??2011-06-13?23:03??細(xì)化算法GUI實現(xiàn)\project\logo.bmp
?????文件?????188928??2011-06-13?23:43??細(xì)化算法GUI實現(xiàn)\report?about?the?project.doc
?????目錄??????????0??2011-06-13?23:46??細(xì)化算法GUI實現(xiàn)\project
?????目錄??????????0??2011-06-13?15:33??細(xì)化算法GUI實現(xiàn)
-----------?---------??----------?-----??----
??????????????1439211????????????????????13
- 上一篇:最小生成樹的MATLAB程序
- 下一篇:MATLAB FIR語音濾波
評論
共有 條評論