Playing Multiple Video simultaneously in one subplot

26 visualizzazioni (ultimi 30 giorni)
Hello,
I have four videos and I want to make a comparison. So, I want to play all videos simultaneously in one subplot. I know how to play one video using
implay(filename)
However, I have no idea how to accomplish that with more than one video and I do not know if MatLab can do that or not.
Thanks

Risposta accettata

Walter Roberson
Walter Roberson il 13 Ott 2016
If you have the Computer Vision toolbox then you can use the instructions at https://www.mathworks.com/help/vision/examples/video-display-in-a-custom-user-interface.html using vision.VideoPlayer
If you not have that then:
  • you can pass a figure or axes handle to movie() and it will play there, but movie() always waits for the playing to finish, so you cannot use it to play several movies simultaneously
  • implay() always opens a new figure. An undocumented aspect is that you can assign the result of implay(), such as h = implay(filename); . In R2014b or later, it returns a UnifiedScope object that has no obvious way to trigger playback. You can set the Parent and Position properties of h.Visual.Axes to a different figure, but there will be no controls there for it.
  • Consider using the videofig File Exchange contribution: if it does not do what you want, you can customize it.
  • watch out for the problem of synchronizing the different videos. The vision.VideoPlayer approach should help with that, as you would have full control over what data you step()'d into the different locations

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by