设为首页 加入收藏

TOP

一个简单的matlab图形界面程序GUI(五)
2014-11-24 03:17:23 来源: 作者: 【 】 浏览:6
Tags:一个 简单 matlab 图形 界面 程序 GUI
ing', '');
set(handles.sliderObj, 'Visible', 'off');
set(handles.currentMsg, 'String', '');
change_objdet_panel(handles, 'maps');
gui_update_names(handles, 'maps');
end
gui_update_msg(cur_img_no, handles);

function st = gui_contents_update_test(handles, cur_img_no, rgbSeg)
% if the rdch be chosen
% show the test result.
objno = floor(get(handles.sliderObj, 'Value'));
runNo = floor(str2double(get(handles.beginValue, 'String')));
if runtime_number_check(handles, runNo) == -1
nmr = 1;
set(handles.beginValue, 'String', '1');
else
nmr = runNo;
end
set(handles.beginValue, 'String', num2str(nmr));
imageName = gui_get_imageName(cur_img_no);
info = getVOC2012ImgInfo(imageName);
set(handles.sliderObj, 'Max', info.objno);

contents = cellstr(get(handles.nbs, 'String'));
cur_conts = contents{get(handles.nbs, 'Value')};
set(handles.sliderObj, 'Visible', 'off');
testRS = gui_obtain_testRS(imageName, str2num(cur_conts), objno, nmr);
if (testRS.st == -1)
tmsg = 'runing test before this action!';
msg = sprintf('Can not find the image %s \n %s', imageName, tmsg);
msgbox(msg,'FileReadError', 'modal');
st = -1;
return;
end

maxV = get(handles.sliderObj, 'Max');
minV = get(handles.sliderObj, 'Min');
if maxV > minV
set(handles.sliderObj, 'Visible', 'on');
step = 1/(maxV-minV);
set(handles.sliderObj, 'SliderStep', [step, 0.1]);
elseif maxV == minV
set(handles.sliderObj, 'Visible', 'off');
end
if objno > maxV
set(handles.sliderObj, 'Value', minV);
objno = minV;
end


gui_update_axes(rgbSeg, 11, handles, 'im');
gui_update_axes(testRS.resIM, 12, handles, 'im');
gui_update_axes(testRS.labIM, 21, handles, 'im');
gui_update_axes(testRS.reslabIM, 22, handles, 'im');
set(handles.percent, 'String', num2str(testRS.percent));
objNo = floor(get(handles.sliderObj,'Value'));
set(handles.objNo, 'String', num2str(objNo));
curMsg = sprintf('obj_%d:%s run_%d nbs_%s',objNo, ...
info.obj(objNo).class, nmr, cur_conts);
set(handles.currentMsg, 'String', curMsg);
change_objdet_panel(handles, 'test');
gui_update_names(handles, 'test');
st = 1;


function gui_update_msg(current_no, handles)
% update the meg content
% set(handles.msg, 'string', message);
imageName = gui_get_imageName(current_no);
info = getVOC2012ImgInfo(imageName);
msg = info.fname;
msg = sprintf('%s\nits has %d objects:', msg, info.objno);
msgObj = '';
for i=1:info.objno
msgObj = sprintf('%sobj_%d:%s\n', msgObj, i, info.obj(i).class);
end
msg = sprintf('%s\n%s', msg, msgObj);
set(handles.msg, 'String', msg);

function change_objdet_panel(handles, tag)
% change object detection panel title content
if strcmp(tag, 'test') == 1
set(handles.objdet, 'Title', 'running time select');
set(handles.textBeginEnd, 'String', 'run_i');
set(handles.endValue, 'Visible', 'off');
set(handles.runBut, 'String', ' next_i');
elseif strcmp(tag, 'maps') == 1
set(handles.objdet, 'Title', 'object detection');
set(handles.textBeginEnd, 'String', ' begin : end');
set(handles.endValue, 'Visible', 'on');
set(handles.runBut, 'String', 'run');
set(handles.beginValue, 'String', '1');
se

首页 上一页 2 3 4 5 6 下一页 尾页 5/6/6
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇如何用Java实现获得MySQL数据库中.. 下一篇队列的多种C语言实现

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·C语言中如何将结构体 (2025-12-24 22:20:09)
·纯C语言结构体成员变 (2025-12-24 22:20:06)
·C语言中,指针函数和 (2025-12-24 22:20:03)
·哈希表 - 菜鸟教程 (2025-12-24 20:18:55)
·MySQL存储引擎InnoDB (2025-12-24 20:18:53)