Filter löschen
Filter löschen

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

3 Ansichten (letzte 30 Tage)
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

Antworten (2)

Prajith Chilummula
Prajith Chilummula am 23 Feb. 2018
Bearbeitet: Prajith Chilummula am 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 am 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

Kategorien

Mehr zu Environment and Settings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by