)));
if imgno_number_check(current_no, handles) == -1
return;
end
gui_contents_update(handles, current_no);
guidata(hObject, handles);
function nbs_CreateFcn(hObject, eventdata, handles)
% hObject handle to nbs (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function showGUI_DeleteFcn(hObject, eventdata, handles)
% hObject handle to showGUI (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
function sliderObj_Callback(hObject, eventdata, handles)
% hObject handle to sliderObj (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
objNo = get(hObject, 'Value');
objNo = floor(objNo);
set(handles.objNo, 'String', num2str(objNo));
current_no = str2double(get(handles.imgNo, 'String'));
if imgno_number_check(current_no, handles) == -1
return;
else
gui_contents_update(handles, current_no);
end
guidata(hObject, handles);
function sliderObj_CreateFcn(hObject, eventdata, handles)
% hObject handle to sliderObj (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
set(hObject, 'Visible', 'off');
guidata(hObject, handles);
function imageName = gui_get_imageName(no)
% get the imagename with order no
namelist = ['/home/aborn/research/code/SalDef/dataset/' ...
'voc2012imglist.txt'];
fid = fopen(namelist);
C = textscan(fid,'%s');
fclose(fid);
name = C{1,1};
clear C;
imageName = name{no,1}(1,1:end-4);
function gui_contents_update(handles, cur_img_no)
cur_img_no = floor(cur_img_no);
mapsdir = '/media/research/mapsCIKM/maps/';
set(handles.imgNo,'String',num2str(cur_img_no));
set(handles.sliderImageNo, 'Value', cur_img_no);
imageName = gui_get_imageName(cur_img_no);
info = getVOC2012ImgInfo(imageName);
imageName = [mapsdir,imageName, '.jpg'];
contents = cellstr(get(handles.nbs, 'String'));
cur_conts = contents{get(handles.nbs, 'Value')};
segmapName = [imageName(1,1:end-4),'_segmap_', cur_conts, '.mat'];
if file_check(segmapName) == -1
return;
end
load(segmapName);
rgbSeg = segmap.rgbSeg;
if (get(handles.rdch, 'Value') == get(handles.rdch, 'Max'))
% if the rdch radio button has been chosen, update test results
if (gui_contents_update_test(handles, cur_img_no, rgbSeg) == -1)
return;
end
else
salmapName = [imageName(1,1:end-4),'_salmap.mat'];
load(salmapName);
defmapName = [imageName(1,1:end-4),'_defmap.mat'];
load(defmapName);
gui_update_axes(imageName, 11, handles);
gui_update_axes(salmap, 21, handles, 'im');
gui_update_axes(defmap, 12, handles, 'im');
gui_update_axes(rgbSeg, 22, handles, 'im');
set(handles.percent, 'String', '');
set(handles.objNo, 'Str