How to plot and Synchronize animated Line Plot and Video?
23 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Shushant
on 31 Jul 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
0 Comments
See Also
Categories
Find more on Lighting, Transparency, and Shading in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!