[GSoC] stitching: new API for parallel feature finding#6642
[GSoC] stitching: new API for parallel feature finding#6642hrnr wants to merge 3 commits intoopencv:masterfrom
Conversation
due to ABI breakage new functionality is added to `FeaturesFinder2`, `SurfFeaturesFinder2` and `OrbFeaturesFinder2`
* perf test (about linear speed up) * accuracy test compares results with serial version
|
Hey Jiri I have a probably silly question:). Can you explain what the ABI problem is when adding the function? |
|
Problem is that I need to add either bool member (in similar way to Problem is that not all finders are thread-safe ( |
|
I must admit I don't like this intrusive change too much. I have been reviewing the code and the thing that seems to be thread-unsafe is Moreover I don't any aparent reason for I'm thinking about different approach to this, something like:
What do you think? Is it acceptable to always run in parallel even for GPU matchers (considering that overhead for TBB is small)? |
|
I am a not GPU expert but it seems nontrivial to make SurfGPU thread-safe according to http://code.opencv.org/issues/3591. However, (I guess) it might be possible to parallel Also if you just want a field to mark thread-safety, do you think sth like this works? |
|
I don't think that could solve our problem. We need some runtime mechanism to know in Finder if implementation is thread-safe or not. I.e. if this case I'm thinking about |
|
I mean or like: Yes, I agree that runtime mechanism is better and more consistent with the OpenCV style but looks like |
|
I still don't see how this construct could solve our problem. Since the only type info I know compile time is Finder and its implementation is assigned at runtime I don't how template could help us. In current implementation if I would simply use your templated If I would put the implemetation to derived class, then I have everything I need, but then I need some mechanism to call this method in derived class. Adding virtual method would break the ABI, so we have the same problem we are trying to solve. Am I missing some trick? |
3eafbab to
c97a967
Compare
|
this PR will be reopened because of CI issues |
Due to ABI this could not be added to
FeaturesFinder. Introduces newFeaturesFinder2. Hope this will me merge toFeaturesFinderin next ABI version.Problem is that we need to know if derived finder is thread-safe or not (that seems to be the case of gpu finder). Derived classes needed to be changed too ->
SurfFeaturesFinder2OrbFeaturesFinder2.API is similar to
FeaturesMatcher.cc: @prclibo