-
-
Notifications
You must be signed in to change notification settings - Fork 170
calc_optical_flow_pyr_lk not populating next_pts #606
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
Comments
I have added a "unit test" and a corresponding python notebook to highlight the differences in the results and have submitted a PR here You don't really have to merge this but I'm not seeing the solution. The code can be found in my forked branch here: (branch unit/opt_flow) Test images are from opencv_extra repo I'm using the latest opencv-rust (0.92.2) built against OpenCV v4.9.0. Please let me know if there is any other information I can provide. I assume I'm just doing something incorrectly but out of ideas. |
I'll check it out, thank you for all the preparation work! |
The example in your PR is actually failing, when I replace
on the line that calls |
yep I get the same only using OpenCV(4.9.0). I should have caught this earlier but still not clear what input i wrong. |
I think I have it, can you try changing the type of let mut err = Vector::<f32>::new(); |
Yep that looks like it did the trick. Thank you so much for the help and terribly sorry for not seeing it myself. I'll update my "example" / unit test in case anyone else encounters the issue. |
I am trying to use the lucas kanade rust bindings, but I think that I am misunderstanding the api or there is perhaps a bug:
given two very similar images the following method fails to populate next_pts
calc_optical_flow_pyr_lk_def
status vec returns all 1's
next_pts is indeed resized to the expected new size however the values are populated only with 0.0's
the corrollary python bindings work as expected.
Any guidance would be greatly appreciated.
The text was updated successfully, but these errors were encountered: