mirror of
https://github.com/opencv/opencv.git
synced 2024-12-14 17:29:17 +08:00
1ba7c728a6
[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
31 lines
601 B
C++
31 lines
601 B
C++
#ifndef __OPENCV_PERF_PRECOMP_HPP__
|
|
#define __OPENCV_PERF_PRECOMP_HPP__
|
|
|
|
#include "opencv2/ts.hpp"
|
|
#include "opencv2/stitching.hpp"
|
|
|
|
#ifdef HAVE_OPENCV_XFEATURES2D
|
|
#include "opencv2/xfeatures2d/nonfree.hpp"
|
|
#endif
|
|
|
|
namespace cv
|
|
{
|
|
|
|
static inline Ptr<Feature2D> getFeatureFinder(const std::string& name)
|
|
{
|
|
if (name == "orb")
|
|
return ORB::create();
|
|
#ifdef HAVE_OPENCV_XFEATURES2D
|
|
else if (name == "surf")
|
|
return xfeatures2d::SURF::create();
|
|
#endif
|
|
else if (name == "akaze")
|
|
return AKAZE::create();
|
|
else
|
|
return Ptr<Feature2D>();
|
|
}
|
|
|
|
} // namespace cv
|
|
|
|
#endif
|