I'm creating a GUI with a bunch of call back functions, the idea is to load an image an do a series of image transformation to it, I would like to keep those changes to the image and pass it around from one call back function to the other, I looked around to see if there is a similar case, even though there was plenty I couldn't figure out what's wrong with my code.
if true % function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
guidata(hObject, handles);img = get(handles.edit1,'String');I = imread(img);guidata(handles.figure1,I);imshow(I);disp(handles.figure1);
% — Executes on button press in pushbutton2. function pushbutton2_Callback(hObject, eventdata, handles) guidata(hObject, handles); h =findobj(0,'tag','figure1'); imshow(h); end
Best Answer