|
Hi everyone!
I'm trying to animate a videoimage synchronized with a plot. Therefore I use the timer function to call this little program:
axes(VideoWindowHandle);
set(VideoImageHandle,'CData',FrameInput(i).cdata)
drawnow;
axes(SignalWindowHandle(1));
set(LineHandle(1),'XData',[i i]);
axes(SignalWindowHandle(2));
set(LineHandle(2),'XData',[i i]);
This function does nothing more to select the subplots wihtin my figure and updates the content of each subplot. I already played around with several techniques to speed up the whole thing (e.g. "EraseMode none", constant image size, etc.). I'm aiming at at least 25 FPS which is hard to realize the more graphs are plotted.
I used the profiler and found out that the "axes" command to select the axes actually consumes most of the time.
Here's the result of the profiler:
axes(VideoWindowHandle) ---> 42.7%
axes(SignalWindowHandle(2)); ---> 41.2%
set(VideoImageHandle,'CData',F... --->11.5%
drawnow; --->1.5%
axes(SignalWindowHandle(1)); --->1.4%
All other lines ---> 1.7%
Anyone has an idea why two calls of "axes" consume so much time? Also I don't understand why two calls of axes are so slow while selecting SignalWindowHandle(1) is a lot faster...
Thanks a lot
Volker
|