Hey guys, im experiencing some problems. I have a GUI where I display my two images so the user can easily choose one of them through two buttons.
function removedBackgroundSelectorView_OpeningFcn(hObject, eventdata, handles, varargin) axes(handles.axes1); imshow(varargin{1}{1}); axes(handles.axes2); imshow(varargin{1}{2}); handles.output = hObject; guidata(hObject, handles);
The callbacks:
function button1_Callback(hObject, eventdata, handles) handles.output = handles.axes1; uiresume;function button2_Callback(hObject, eventdata, handles) handles.output = handles.axes2; uiresume;
And the output function
function varargout = removedBackgroundSelectorView_OutputFcn(hObject, eventdata, handles) uiwait; varargout{1} = getimage(handles.output);
So, there is my problem, it does not matter wich button I press, I always get the image from axes2. I tried really hard to solve it by myself but had no results.
Thanks
Best Answer