Repository navigation
[evolution] Stitching for OpenCV 4.0 - #12827
Conversation
Agreed. CUDA code doesn't work here > 3 years: #8792 |
|
I have dropped What do you think about dropping |
Sounds good. |
|
May be too late but in this example I can save all results of stitching process except ExposureCompensator. Is it possible to add a method to get ExposureCompensator result? |
|
I don't get what you want to achieve. There is |
|
I need to investigate more but I think it is gain_maps Example I have two webcam and I stitch images. I save everything . Then I can run my program without any initialize stitching (except ExposureCompensator) |
* provide method for consistent stitcher usage across languages
* port cpp stitching sample to python
* remove Stitcher::createDefault, it returns Stitcher, not Ptr<Stitcher> -> inconsistent API * deprecate cv::createStitcher and cv::createStitcherScans in favor of Stitcher::create
* ORIG_RESOL should be double * add documentatiton
|
I have rebased the brach due to merge conflict. |
|
@hrnr Well done! Looks like there is bug in SURF detector which doesn't handle masks correctly (fix will be merged soon into opencv_contrib: opencv/opencv_contrib#1887). Other possible issue is about resizing of "mask": I believe Please squash "fixup" commits and we are ready to merge this for OpenCV 4.0 release. |
|
👍 can be merged as soon as buildbot becomes green |
* remove ABI hack
* OCL will be used automatically through T-API in OCL-enable paths * CUDA won't be used unless user sets CUDA-enabled classes manually
* use Feature2D instead of FeaturesFinder * interoperability with features2d module * detach from dependency on xfeatures2d
* correctly pass UMats as UMats to allow OCL paths * support vector of UMats as output arg
|
Thanks for the review. You are right, @alalek, Squashed fixup commits, rebased. As you know I wanted a bigger scope for this, but I don't have much of a free time nowadays to put into this as I'm starting in a new job. At least, I'd love to see something similar done for For the time being, I'm glad that at least this part goes in. |
|
@hrnr I can work on stitching module. I already wrote an example in C++. I need to translate this example in python. I need your PR. If something is missing I can make a new PR. |
|
Sure go for it. My plan for |
|
Thanks for fixing those, you were faster than me. |
[evolution] Stitching for OpenCV 4.0 * stitching: wrap Stitcher::create for bindings * provide method for consistent stitcher usage across languages * samples: add python stitching sample * port cpp stitching sample to python * stitching: consolidate Stitcher create methods * remove Stitcher::createDefault, it returns Stitcher, not Ptr<Stitcher> -> inconsistent API * deprecate cv::createStitcher and cv::createStitcherScans in favor of Stitcher::create * stitching: avoid anonymous enum in Stitcher * ORIG_RESOL should be double * add documentatiton * stitching: improve documentation in Stitcher * stitching: expose estimator in Stitcher * remove ABI hack * stitching: drop try_use_gpu flag * OCL will be used automatically through T-API in OCL-enable paths * CUDA won't be used unless user sets CUDA-enabled classes manually * stitching: drop FeaturesFinder * use Feature2D instead of FeaturesFinder * interoperability with features2d module * detach from dependency on xfeatures2d * features2d: fix compute and detect to work with UMat vectors * correctly pass UMats as UMats to allow OCL paths * support vector of UMats as output arg * stitching: use nearest interpolation for resizing masks * fix warnings
[evolution] Stitching for OpenCV 4.0 * stitching: wrap Stitcher::create for bindings * provide method for consistent stitcher usage across languages * samples: add python stitching sample * port cpp stitching sample to python * stitching: consolidate Stitcher create methods * remove Stitcher::createDefault, it returns Stitcher, not Ptr<Stitcher> -> inconsistent API * deprecate cv::createStitcher and cv::createStitcherScans in favor of Stitcher::create * stitching: avoid anonymous enum in Stitcher * ORIG_RESOL should be double * add documentatiton * stitching: improve documentation in Stitcher * stitching: expose estimator in Stitcher * remove ABI hack * stitching: drop try_use_gpu flag * OCL will be used automatically through T-API in OCL-enable paths * CUDA won't be used unless user sets CUDA-enabled classes manually * stitching: drop FeaturesFinder * use Feature2D instead of FeaturesFinder * interoperability with features2d module * detach from dependency on xfeatures2d * features2d: fix compute and detect to work with UMat vectors * correctly pass UMats as UMats to allow OCL paths * support vector of UMats as output arg * stitching: use nearest interpolation for resizing masks * fix warnings
I have received a very little feedback on evolution proposal #11039. I have decided to come with some code, to start the discussion. Here are some minimal changes in the stitching module, that I think should go to OpenCV 4.0. Large parts of the evolution proposal are not implemented and I'm awaiting further feedback.
detail::FeaturesFinderanddetail::FeaturesMatcherwrapper classes. Usecv::Feature2Dandcv::DescriptorMatcherfrom features2d module. This will allow to use all features and descriptors with stitching modules. Move all estimation code fromdetail::FeaturesMatchertodetail::Estimator. This also solves problems with dependencies on xfeatures2d.detail::EstimatorStitcher::create, wrap this method for Python. Droptry_use_gpuflag, rely on T-API or user explicitly setting CUDA classes to use.