필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
tbn
tbn 2018년 2월 10일
답변: tbn 2018년 2월 23일
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

답변 (2개)

Prajith Chilummula
Prajith Chilummula 2018년 2월 23일
편집: Prajith Chilummula 2018년 2월 23일
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 2018년 2월 23일
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

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by