High Speed Video Capture

Hi Guys,

I’m working on a fun side project where we want to record super slo-mo footage of people getting hit in the face with custard pies (highly un-original and immature… but good fun none the less:)

Just wondering if anyone has tried to build a high speed capture system using OF, and what their results are like? There is a great plugin for final cut/after effects etc… called twixtor (www.revisionfx.com/products/twixtor/) that does a great job of interpolating frames to slow things down even further (equivalent 1000fps), but you need to give it a minimum of 60-100fps to start with.

I’ve just been looking at the ‘movieGrabber’ example and noticed you can manually set the capture framerate for the input source. I think we need to get about 100-200fps capture at 720p, from what would probably be an HD webcam.

I think i’ve got a fairly good idea how to go about implementing the code, I guess the question is more about the hardware. Does anyone know of a webcam with high enough refresh rate to be able to capture at high speed? And if they have tried this sort of thing, what were the results/experiences like?

Thanks guys, looking forward to your responses!


There are several factors to consider for this project: The first challenge is the camera; finding an affordable HD webcam that can do 100-200 fps is simply not going to happen. At this speed and resolution you’re going to be looking at industrial/scientific/medical imaging cameras which tend to be very expensive and sometimes require their own SDKs.

The most bang for your buck in this department is going to be the Sony PS3Eye camera. It can do up to 125fps @ 320x240 or up to 60fps at 640x480 and it costs ~$40. However, if you can find a cheap HD webcam with 60+ fps I would love to know about it :slight_smile:

The second issue is saving video to disk fast enough to keep up with HD video at high framerate. As it turns out this isn’t an easy task. Check out this thread where kyle and I posted our own threaded image saving classes. http://forum.openframeworks.cc/t/high-framerate-capture-to-disk/2991/0

The basic idea is to capture in the main thread and hand off each frame to a separate thread to do the I/O. If saving the image takes too long then you will drop frames. I’ve attempted to get around this by adding each incoming frame to a queue in memory and processing them in order, but it is easy to run out of memory if you capture for too long. You would also cut down on IO time by saving to a solid state drive.

I’d love to hear what you come up with because I’ve been interested in this problem myself, good luck!