How to plot and Synchronize animated Line Plot and Video?

23 visualizzazioni (ultimi 30 giorni)
Hello,
I have a video recording of single leg jump and the IMU data of the jumper in the video. I want to see in same window the video and animated graph of data (for example: the vertical velocity of the jumper).
1) how i'm importing the video and see him?
2) how i'm create a animated plot and plot him?
3) how i'm plot them in same window and synchronize between them (start and finish in the same time)?
thank you

Risposte (1)

Shushant
Shushant il 31 Lug 2023
According to my understanding, you want to make two plots, one plot should display the video while the other plot should show the line plot. Then you want to synchronize both the video and the line plot to observe how the plot changes based on the change in the video.
To plot multiple plots in the same window you can use “tiledlayout” or “subplot” and update the plots later using their “axis handles”.
Refer to the following documentations –
To plot the video frame by frame you can use “VideoReader”.
Refer to this documentation-
To synchronize both the video and the line plot, you can use a for loop in which after every iteration you update the video with the next frame and the line plot with the next data points. Also remember to add “pause” in the loop so that the figure gets updated.
An example of the same can be found in this thread –
I hope this helps in solving the issues you were facing.
Thank you,
Shushant

Categorie

Scopri di più su Lighting, Transparency, and Shading in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by