Plotting data on videos – A useful way to convey qualitative and quantitive information

Every once in a while, someone makes an impression on you that lasts for a lifetime. It sticks with you every single time. This is one of those, although a bit on the nerdy side, it is one that can change the way you present information in a very meaningful way.
I was once sitting at the NIST annual fire conference, going about my business, and someone working on a project regarding the structural response aspect of buildings on fire showed a video in their presentation. No big deal, right? Normally, we get cool fire videos, then some plots, and so on. Sometimes the plots are interesting, sometimes they are default from Excel with the ugly legend and all – with no story to tell.
But not this guy. He showed a video with real-time plots superimposed over the video showing the exact real-time structural response of the structure overlaid on the video in a plot. “AMAZING!” I thought. And it stuck with me. A useful way to convey synchronous information. People love videos, why not tell the qualitative AND quantitative story at the same time?
So I started working in grad. school on fire problems, and naturally, soon thereafter, I was scheduled to give a presentation. As most of my real creative coding and writing work happens of hours between the hours of 1 AM and 6 AM, I wanted to make this happen. I REALLY wanted some real-time plotting action in my presentation. No Excel templates for me! So I stayed up for a couple nights and worked on a way to use MATLAB to make this plotting dream a reality: I worked on importing videos, messing with frame rates, tons of images, and so forth. And soon thereafter, it happened. I had a working script.
I used it to show plots of large-scale fire tests with actual and predicted flame heights vs. time as seen here:
And I used the script to show the predicted flame heights on a small-scale test in an amazing way that just about anyone can relate to, fire-crazed scientist or not:
From anyone who has seen the videos firsthand, the response has been amazing. This is a great teaching and communication tool, and surprisingly enough, I haven’t found any existing program or tool that does this. And so I am sharing the videos and script here for anyone to use to better convey information.
My next steps are: 1) to convert the script to Python (since I am now almost exclusively using Python+numpy+scipy for my graduate research and daily work instead of MATLAB, and 2) to make the script into a cross-platform and easy to use tool.
I’m providing the code in its raw and uncommented and unedited form. It generates a number of images with plots superimposed on them, and then it is trivial to use a program to stitch them together into a video. I used Quicktime’s built in method. Sorry, too much current work going on finishing my MS thesis and Master’s degree to clean up the code, but it’s a brutal use of the “release early, release often” ideal! Hopefully someone can make some use of it.
So, here are the linked .m files:
http://www.koverholt.com/scripts/ssPlotVideo.m
http://www.koverholt.com/scripts/fireplotVideo.m
Enjoy! And please leave your comments or ideas!