VideoReader in App Designer

13 次查看(过去 30 天)
T.A.S.
T.A.S. 2018-7-11
评论: OCDER 2018-7-12
How do I use VideoReader in app designer to display video on a UIAxes?

回答(1 个)

OCDER
OCDER 2018-7-11
编辑:OCDER 2018-7-12
I'm guessing you're familiar with callbacks in app designer? If not, here's the tutorial.
>> appdesigner.internal.application.openTutorial('BasicCoding')
In the callback function for the button that will read the video image, do something like this:
filename = 'myvideo.mp4';
v = VideoReader(filename);
while hasFrame(v)
imshow(getFrame(v), 'Parent', app.UIAxes);
end
  5 个评论
T.A.S.
T.A.S. 2018-7-12
How do i get it to play multiple frames from the video? its just displaying one for now.
OCDER
OCDER 2018-7-12
You might need to add a drawnow or pause(0.01) after the imshow to be able to see the video. Not sure how to set the frame rate, as that requires a different function called implay, which doesn't seem to be able to control a UIAxes.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by