How can showing gif image during matlab processing
8 次查看(过去 30 天)
显示 更早的评论
I am developing a code to show a gif image during matlab processing. When the process is finished, the gif image is closed and the result would be plotted. However, the gif image is stopped when the matlab processing is being processed.
gif_image='C:\Users\Amir\Desktop\spinner.gif';
[handles.im,handles.map] = imread(gif_image,'frames','all');
handles.len = size(handles.im,4); % number of frames in the gif image
delay_length = 0.2;
axes(handles.axes1)
hold(handles.axes1,'on');
imshow(handles.im(:,:,:,1),handles.map);
handles.count = 1;% intialise counter to update the next frame
handles.guifig = hObject;
handles.tmr = timer('TimerFcn', {@TmrFcn,handles.guifig},'BusyMode','Queue',...
'ExecutionMode','FixedRate','Period',delay_length); %form a Timer Object
guidata(handles.guifig, handles);
start(handles.tmr); %starts Timer
% Update handles structure
guidata(hObject, handles);
when this part is going to begin, showing the gif image is stoped. :(
try
[matlabImage mask1 col col1 x y boundaries]=read_img();
1 个评论
Jan
2017-8-28
What is the contents of TmrFcn()? Is this still executed during the computations? If not, this would be a better description: "The timer callback is not executed during processing".
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!