Syncing up Video to Datafile for Animated plot
based on a few inputs:
-data file
-video file
-data acquisition rate
-frame nr. of the input video that corresponds to first datapoint
this script will output the original video (on the left) and in addition will display an animated version of the x,y plot (on the right).
optionally:
-lets you specify the size of the image relative to the size of the plot
-specify the margins
-lets you rotate the video
-lets you crop to the part of the video you're interested in
Due to the way one makes animated plots in MATLAB - the resolution of the output video will depend on your screen resolution. However, this script is made so that it runs on both Mac OS X and windows, and should work for arbitrary screen resolutions.
For getting a good result one still might need a to fiddle a bit with the exact position of the x/ylabels, but at least one won't have to start from scratch. Let me know if you have suggestions to improve performance / usefulness.
Cite As
Peter Dieleman (2025). Syncing up Video to Datafile for Animated plot (https://www.mathworks.com/matlabcentral/fileexchange/44636-syncing-up-video-to-datafile-for-animated-plot), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- FPGA, ASIC, and SoC Development > Vision HDL Toolbox > Video Formats and Interfaces >
- Image Processing and Computer Vision > Vision HDL Toolbox > Video Formats and Interfaces >
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.1.0.0 | typo |