-
Notifications
You must be signed in to change notification settings - Fork 41
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
Feature/optiflow #93
base: master
Are you sure you want to change the base?
Feature/optiflow #93
Conversation
Bloody fmt! |
native/optflow.cc
Outdated
auto array_out = cv::InputOutputArray(*out); | ||
|
||
auto optical_flow = cv::optflow::createOptFlow_SparseToDense(); | ||
optical_flow->calc(array_from, array_to, array_out); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can these calls be wrapped? these functions could throw exceptions
see my pr here - using EmptyResult::FromFunction
or Result::FromFunction
would be useful so that errors don't panic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They probably can and I'm pretty sure there'll be plenty of other preconditions that can be verified, but I can't dedicate more time to refine the wrapper at this stage.
Happy to help clean this up if OP doesn't have time to polish |
Hi @joelgallant - help is very welcome. I'll fix the easy stuff and leave you with the wrapping. Do you want to fork from mine, or should we merge in and then you clone from the original (my recommended option). This way we could have the wrappers available earlier (and I could import the official crate rather than my own hacks :) ) |
I have removed the project files - I think for all other suggested changes "someone" should make separate PRs when appropriate :) |
Ping? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Minor changes requested
Ping? |
@norru sorry, my new year finally ended :) Please, add comments to functions like Then I'm going to merge this. Thank you for patience, sorry for a long waiting. |
} | ||
|
||
/// | ||
pub fn cfrom_optical_flow_dtvl1( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be calc_optical_flow_dtvl1
Hi, I have added a bunch of bindings for Optical Flow and a bug fix, as I needed them in for a project. Feel free to integrate, I can't dedicate much time to polish, you're very welcome to take it from there :)