eazuela
Computer
- Dec 5, 2005
- 2
I'm making a GUI and i have to show a image every second. I create a timer to do so in opening function from the GUI like this:
handles.tempo = timer;
handles.tempo.ExecutionMode = 'FixedSpacing';
handles.tempo.StartDelay = 5;
set(handles.tempo, 'TimerFcn', {@myphoto_Callback, handles});
handles.tempo.Period = 1;
start(handles.tempo);
This code generate the timer and every second call the subrutine 'myphoto_Callback', where i try to show the image on axes from de GUI like this:
function myphoto_Callback(h, event, handles)
axes(handles.axes1);
photo = imread(handles.path,handles.format);
imshow(photo);
end
It suppose that handles.path and handles.format get good values in opening function from the GUI.
MY PROBLEM IS ALTHOUGH I'M INDICATING THAT THE IMAGE HAS TO SHOW IN MY AXES ANOTHER FIGURE COMES AND SHOW IT.
HOW COULD I DO TO SOLVE IT?
handles.tempo = timer;
handles.tempo.ExecutionMode = 'FixedSpacing';
handles.tempo.StartDelay = 5;
set(handles.tempo, 'TimerFcn', {@myphoto_Callback, handles});
handles.tempo.Period = 1;
start(handles.tempo);
This code generate the timer and every second call the subrutine 'myphoto_Callback', where i try to show the image on axes from de GUI like this:
function myphoto_Callback(h, event, handles)
axes(handles.axes1);
photo = imread(handles.path,handles.format);
imshow(photo);
end
It suppose that handles.path and handles.format get good values in opening function from the GUI.
MY PROBLEM IS ALTHOUGH I'M INDICATING THAT THE IMAGE HAS TO SHOW IN MY AXES ANOTHER FIGURE COMES AND SHOW IT.
HOW COULD I DO TO SOLVE IT?