How to plot and Synchronize animated Line Plot and Video?

23 Ansichten (letzte 30 Tage)
Itai Gutman
Itai Gutman am 25 Jul. 2023
Beantwortet: Shushant am 31 Jul. 2023
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

Antworten (1)

Shushant
Shushant am 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

Kategorien

Mehr zu Lighting, Transparency, and Shading finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by