Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dense optical flow algorithm #57

Open
hellochar opened this issue Mar 23, 2016 · 1 comment
Open

dense optical flow algorithm #57

hellochar opened this issue Mar 23, 2016 · 1 comment

Comments

@hellochar
Copy link

Hey inspirit, awesome library. Any chance we could get a dense optical flow algorithm? I'm kinda hacking it right now by placing sparse points on a regular grid in my image, but of course it has its drawbacks. I poked around a bit and found https://github.com/anvaka/oflow/blob/master/dist/oflow.js which looks like it already has an implementation? Thanks!

@gilborty
Copy link

gilborty commented Jul 8, 2016

Hey @hellochar, I don't think the code you linked implements a dense optical flow algorithm. Actually, it seems like it uses Lucas-Kande which jsfeat has already implemented here with the demo here.

With that being said, dense optical flow algorithms such as Gunner Farneback's algorithm tend to run very slow using only the CPU because they, in short, calculate flow for all of the pixels instead of only some as is the case with sparse optical flow algorithms. Check out this page for an example using OpenCV. However, dense optical flow algorithms can actually run close to real-time if you offload the calculations to a GPU. If you intend to implement your own, in JavaScript, might I suggest using Three-js and check out the WebGL examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants