Sam Gentle.com

Motion interpolation is (wonderful) voodoo

For a project I'm working on, I wanted to create a nice spinning Earth background video. After digging around for a while I discovered that NASA had exactly the sort of video I was looking for. Only problem is it's only 8 seconds long. In my ideal world, it would spin slower and last longer, but you can't just pull more frames out of the air... or can you?

A technique called motion interpolation is able to do exactly that, with certain limitations. Most of those limitations aren't a problem for something as simple as a spinning globe, so my issue was just finding some software to do it for me. Many modern TVs actually have interpolation built in with brand-appropriate names like SmoothTrueMotionFlow, there seemed to be a few Windows video player plugins, and it seems to be a popular feature in high-end video suites. Unfortunately for me, I didn't want to hack my TV, install Windows or pay thousands of dollars. My search seemed doomed.

In the end, my saviour was a Swiss student named Simon Eugster, whose slowmoVideo is an open-source was created as a thesis project. It works by splitting the video into individual frames, then comparing each frame to nearby frames to calculate the optical flow - basically a measurement of how much each part of the video is moving. It then uses that information to create aditional frames, sews the video back up and there you go.

It turned out that slowmoVideo was way more sophisticated than I needed. It doesn't just slow down video, it allows you to draw custom slow-down-speed-up curves so you can do the whole Hollywood fight scene thing. It can even add motion blur. I felt a bit lame just drawing one long straight line and turning off all the options, but, hey, it worked and I got my slow-mo Earth.

If I hadn't heard about motion interpolation, I'd still be thinking that slowing down a video without making it jerky or blurry was impossible. I guess this is just one more to add to the pile of impossible computer graphics tricks that also includes resizing by deleting boring parts of an image, removing motion blur, and doing all your image editing by just drawing a box and telling Photoshop to figure out the rest.

Whatever they're putting in the water at SIGGRAPH must be pretty strong.