Borrar filtros
Borrar filtros

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

3 visualizaciones (últimos 30 días)
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

Respuestas (2)

Prajith Chilummula
Prajith Chilummula el 23 de Feb. de 2018
Editada: Prajith Chilummula el 23 de Feb. de 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 el 23 de Feb. de 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

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by