We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Using optical flow to slow down time (Read 1004 times)
Using optical flow to slow down time
Feb 8th, 2010, 12:58pm
 
Good day everyone.

I'm trying to reconstruct what a group of people did here:
grail.cs.washington.edu/projects/enhancing-spacetime/

According to them, they use an optical flow algorithm to slow down video using input from both hi-res still images and low-res camcorders and calculating an "average" frame.

So I've been lurking around, trying to find a way to do this in processing, without any result.
I wish to reproduce their work, but only using hi-res still images, instead of a video source.

Any help is much appreciated, as this is part of my final project for school.
Re: Using optical flow to slow down time
Reply #1 - Feb 9th, 2010, 4:03am
 
there's a pdf on the site that gives an idea of the process.

in order to "slow down time" you'll probably have to find the optical flow between 2 frames and create intermediate frames in which you draw the moving part on an (1 or more depending on how much slower you want to go) intermediate position.

it's gonna be lots of pixel cycling, but nothing really harder than this Smiley good luck with the project!
Re: Using optical flow to slow down time
Reply #2 - Feb 9th, 2010, 5:10am
 
yeah, well that's the problem.

i'm not familiar with neither optical flow nor 'intermediate pixel positioning'.
regarding working with pixels i'm still exploring new grounds, so this is all a little bit diffuse to me. it's not like i dont understand nothing, i just need a little help to get started on how to approach the problem.
Re: Using optical flow to slow down time
Reply #3 - Feb 10th, 2010, 3:38am
 
ok, then I'll try to give you a starting point on each topic, starting from the easiest to master:

- working with pixels is easy: it's just a matter of cycling with for loops. if you're familiar with the pixels[] array you know that it stores every single pixel (in the form of color variables) of your image/video frame. it's width*height long and you can access every pixel by their cohordinates with the formula pixels[w*width+x]

- for the optical flow: look here and here

after trying the optical flow code (or other simpler techniques like fame differencing) you should recognize with ease the changing areas, so you you'll probably be able to create the intermediate frames.
Page Index Toggle Pages: 1