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 |