Pairing data and video frames in MATLAB
July 24, 2006 5:39 AM   Subscribe

I have a 10 FPS video, and a set of numerical data for every frame in the video. How can I pair up each frame with its set of data in MATLAB?
posted by freddymungo to Computers & Internet (3 answers total)
 
Is the movie already in Matlab? If not, import it using "aviread". Other formats have to be converted, or maybe there's some kind of tool out there.

Once the movie has been imported, it's a "mov" variable. You can extract frames using "frame2im" to get single frames from the movie as indexed images.

Using these single frames, you can make a "subplot" showing both the image data and the corresponding data (graph?).

Of course, this all depends what you want to do exactly. Send me an e-mail if you need any help.
posted by swordfishtrombones at 6:02 AM on July 24, 2006


I'm not totally sure what the challenge is here. If you have as many frames as you have sets of numerical data, you should just be able to loop through them simultaneously. Are you trying to animate the numerical data too? You can use 'getframe' and 'movie' for that.

Could you be a little more specific?
posted by heresiarch at 7:36 AM on July 24, 2006


Response by poster: I've only been using MATLAB for a couple of weeks now total, so I have next to no experience and I'm still figuring out how it all works. My ultimate goal with my project is to be able to pick any point on the graph and see the corresponding video frame (yes, there are as many frames as sets of data). So any help in that direction is also appreciated, but this was the part I've been specifically stuck at.
posted by freddymungo at 8:40 AM on July 24, 2006


« Older Two for the price of one?   |   An online tool to help us schedule which family... Newer »
This thread is closed to new comments.