Clear Filters
Clear Filters

(App Designer) Refresh rate low displaying high-res video in GUI created by AppDesigner

3 views (last 30 days)
Hello, I am having trouble with the following test-function:
Load a short high-res video and display it in a GUI that was created using App Designer. With the
drawnow()
commented out, the stream doesn't display. With the
drawnow(),
I get only ~1fps.
Is there any other solution than downsampling the displayed image-stream (fewer pixels)?
function test()
close all;
% vidFullPath = 'traffic.mj2'; % low-res Matlab sample video: works
vidFullPath = 'sample.avi'; %1920x1080 video-snipped
vidSrc = vision.VideoFileReader(vidFullPath,'ImageColorSpace','RGB');
gui = test_GUI();
img = step(vidSrc);
imshow(img,'Parent',gui.UIAxes);
% drawnow();
while ~isempty(img)
imshow(step(vidSrc),'Parent',gui.UIAxes);
% drawnow();
end
end
Any help is greatly appreciated!
Thanks, tbn

Answers (2)

Prajith Chilummula
Prajith Chilummula on 23 Feb 2018
Edited: Prajith Chilummula on 23 Feb 2018
Hello, can you try using
drawnow limitrate;
to increase the animation rate. Refer this link for more information:
https://www.mathworks.com/help/matlab/ref/drawnow.html

tbn
tbn on 23 Feb 2018
Thanks Raghu ram for your answer.
drawnow limitrate
does not solve it. In the meantime, I received some feedback from the MathWorks Support team which basically tells me that - at this stage - I'd have to code my own GUI or use GUIDE in order to play video inside a custom GUI. They did reach out to their development team to improve this behavior. So there's hope.
tbn

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!