16 comments

[ 2.1 ms ] story [ 40.4 ms ] thread
What's the relationship between "optical flow" and tweening?
Optical Flow is a method for determining the movement between two or more frames of video. This data is then used for morphing the frames into one another, or moving the underlying vertexes of the textures from one position to the next.
To find optical flow, you first pick out a collection of sample points in frame A. What constitutes a good sample point depends on your specific algorithm, although generally speaking you pick "corners". In OpenCV, you can easily do this by calling cvGoodFeaturesToTrack().

You then search for those same sample points in the successive frame B, and end up with a collection of vectors that probably represent the motion of each point. Using OpenCV, this is usually done with cvCalcOpticalFlowPyrLK().

Tweening is basically just interpolation.

(comment deleted)
This is very cool, thanks for that. Can we run this on a GPU? If not, how feasible would dense optical flow running on cpu be in terms of speed to convert short non-hd videos?
I always like to joke that, with proprietary software, you get the best developers money can buy, but with free and opeen-source software, you get he best developers money can't buy.

It's an impressive program. Simon deserves a lot of credit and gratitude for giving it to the world.

this is a beautiful piece of software! Thanks simon!
The output is surprisingly good. I am impressed.
Gaaagh - there goes my weekend.
Is there a command line interface for this app? I'd like to batch the creation of clips using different settings and maybe make a service out of it.
The results from the videos are excellent! I am truly impressed. Will try this out during the weekend.
I was kind of surprised he did not win at the swiss open source awards. Slowmo was truly the most impressive thing by far.
This is quite amazing! I was thinking if you could use this application with a video based security could you reduce the amount of disk space required. Thoughts? I'm sure there are other applications as well
That makes me shudder. Security footage "compressed" this way wouldn't stand up in court (I hope); did the guy on the tape really do that, or did the algorithm just fill it in?
Sadly its only interpolating the motion between frames, so you don't get back any new information.

Also optical flow really doesn't handle occlusions very well, so if one thing obscures another you'll get lots of artifacts.

Fantastic. Now that's someone/something I would put in the "real software engineer" category. None of this web2.0 mumbojumbo.