scivision / pyoptflow Goto Github PK
View Code? Open in Web Editor NEWOptical Flow estimation in pure Python
License: Apache License 2.0
Optical Flow estimation in pure Python
License: Apache License 2.0
File "HornSchunck.py", line 22
fn1 = f'{stem}.{i}{ext}'
^
SyntaxError: invalid syntax
Above error appears when python HornSchunck.py data/box/box
. Tested in Windows and Ubuntu, python 2.7
Hey,
Nice code!
The output is flipped. You probably have noticed. I fixed that with a simple np.flip.
im1 = np.flip(im1, 0)
im2 = np.flip(im2, 0)
Basically, I'm wondering if you could combine optical flow data from a camera with other sensor data using something like a KF or UKF. The application would be model aircraft, drones or stabilized model rockets. So the optic flow should be due primarily to rotations, translations and perspective effects. The camera would be aligned with one of the vehicles axes and could look at just rotation about that axis, for example.
Basically I'm wondering how fast it is, and if there is a way that you could feed it live data from a camera.
Obviously, I could hunt through the code, so answers that are equally as lazy as my question are welcome, haha!
Hi,
I have a question regarding the HornSchunck method and the partial time derivative:
ft = im2 - im1
ft = filter2(im1, kernelT) + filter2(im2, -kernelT)
with kernelT = np.ones((2, 2))*.25
If my understanding is correct, you substract the values from the second image from the ones in the first image.
In the Horn und Schunck paper I understood that you are supposed to do it the other way around.
Could you maybe tell me, if I understood it wrong or what the reasoning is to put this the other way around?
I also tried implementing the method myself, and exactly this issue seems to be my problem. If I implemented this with the minus sign in the im2 kernel, my directions are correct. I just donot understand why that is the case.
Thank you and greetings!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.