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');
set(handles.endValue,'String','1');
end
function gui_update_names(handles, tag)
if strcmp(tag, 'test') == 1
set(handles.name11, 'String', 'setment map');
set(handles.name12, 'String', 'object detection result');
set(handles.name21, 'String', 'human label information');
set(handles.name22, 'String', 'label and detection res.');
elseif strcmp(tag, 'maps') == 1
set(handles.name11, 'String', 'origin image');
set(handles.name12, 'String', 'defocus map');
set(handles.name21, 'String', 'saliency map');
set(handles.name22, 'String', 'segment map');
end
function gui_update_axes(imageName, axespos, handles, class)
% refresh the axes content using imageName
if nargin < 4
class = 'image';
end
if axespos == 11
axes(handles.axes11);
elseif axespos == 12
axes(handles.axes12);
elseif axespos == 21
axes(handles.axes21);
elseif axespos == 22
axes(handles.axes22);
end
if strcmp(class,'image') == 1
im = imread(imageName);
elseif strcmp(class,'im') == 1
im = imageName;
else
disp('error in using gui_update_axes');
end
imshow(im);
function st = runtime_number_check(handles, no)
% check the runtime wether between in [1, 10]
if isnan(no)
msgbox('You must entry a number value','InputError', 'modal');
st = -1;
return;
elseif no <= 0 || no > 10
msgbox('Input number must between [1,10]!!','Attention','modal');
st = -1;
return;
else
st = 1;
return;
end