필터 지우기
필터 지우기

How to plot and Synchronize animated Line Plot and Video?

조회 수: 26 (최근 30일)
Itai Gutman
Itai Gutman 2023년 7월 25일
답변: Shushant 2023년 7월 31일
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