Effacer les filtres
Effacer les filtres

VideoReader in App Designer

13 vues (au cours des 30 derniers jours)
T.A.S.
T.A.S. le 11 Juil 2018
Commenté : OCDER le 12 Juil 2018
How do I use VideoReader in app designer to display video on a UIAxes?

Réponses (1)

OCDER
OCDER le 11 Juil 2018
Modifié(e) : OCDER le 12 Juil 2018
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 commentaires
T.A.S.
T.A.S. le 12 Juil 2018
How do i get it to play multiple frames from the video? its just displaying one for now.
OCDER
OCDER le 12 Juil 2018
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by