mirror of https://github.com/opencv/opencv.git
Open Source Computer Vision Library
https://opencv.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
641 B
30 lines
641 B
#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(); |
|
#if defined(HAVE_OPENCV_XFEATURES2D) && defined(OPENCV_ENABLE_NONFREE) |
|
else if (name == "surf") |
|
return xfeatures2d::SURF::create(); |
|
#endif |
|
else if (name == "akaze") |
|
return AKAZE::create(); |
|
else |
|
return Ptr<Feature2D>(); |
|
} |
|
|
|
} // namespace cv |
|
|
|
#endif
|
|
|