How to plot and Synchronize animated Line Plot and Video?

19 次查看(过去 30 天)
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

回答(1 个)

Shushant
Shushant 2023-7-31
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

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by