资源简介
matlab GUI 实现细化算法,界面简洁实用,包含实验报告,扩展到机器人路径规划问题!
代码片段和文件信息
%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 细化算法GUI实现\project\READ ME.txt
文件 20540 2011-06-13 16:04 细化算法GUI实现\project\ob
文件 18188 2011-06-13 21:01 细化算法GUI实现\project\path.TIF
文件 240054 2010-07-06 11:18 细化算法GUI实现\project\sorce_img.bmp
文件 5587 2011-06-13 16:38 细化算法GUI实现\project\thining.asv
文件 17050 2011-06-13 15:52 细化算法GUI实现\project\thining_chinese.TIF
文件 5797 2011-06-14 00:14 细化算法GUI实现\project\thinning.m
..A.SH. 35840 2011-06-14 00:06 细化算法GUI实现\project\Thumbs.db
文件 16452 2011-06-13 16:31 细化算法GUI实现\project\utk.tif
文件 890678 2011-06-13 23:03 细化算法GUI实现\project\logo.bmp
文件 188928 2011-06-13 23:43 细化算法GUI实现\report about the project.doc
目录 0 2011-06-13 23:46 细化算法GUI实现\project
目录 0 2011-06-13 15:33 细化算法GUI实现
----------- --------- ---------- ----- ----
1439211 13
- 上一篇:最小生成树的MATLAB程序
- 下一篇:MATLAB FIR语音滤波
相关资源
- MATLAB FIR语音滤波
- 最小生成树的MATLAB程序
- 基于MATLAB对FSK信号调制与解调的仿真
- 基于遗传算法的机器人路径规划MATL
- 无向图中最大团问题的matlab代码
- UKF无迹卡尔曼滤波算法matlab代码
- 遗传算法图像分割Matlab编写
- 盲源分离的JADE算法的Matlab程序
- 基于埃米特样条函数提取包络线实现
- 自相关和周期自相关函数matlab
- Matlab2011a中文汉化补丁
- 刘金琨《滑模变结构控制MATLAB仿真第
- matlab编程源程序
- MDP马尔可夫决策过程 MATLAB 源码
- STK-matlab GUI 仿真程序
- 图像分割算法 GVF snake matlab编写程序
- MATLAB自动多阈值分割
- 平均周期图 谱估计 matlab版
- AR 谱估计 matlab版
- 图像超分辨率MATLAB实现
- 2dpca的matlab源代码 rar
- 计算方法matlab练习
- ID3决策树-MATLAB程序
- matlab 两种自适应数值积分算法
- Matlab单像素成像算法比较
- 硬币统计matlab
- 菲涅尔衍射仿真matlab程序
- 有限元平面应力及桁架机构matlab代码
- 使用matlab进行质心计算
- APF的Matlab仿真
评论
共有 条评论