2011-09-13 19:19:40 +08:00
|
|
|
#ifndef __OPENCV_PERF_PRECOMP_HPP__
|
|
|
|
#define __OPENCV_PERF_PRECOMP_HPP__
|
|
|
|
|
2013-03-13 20:22:44 +08:00
|
|
|
#include "opencv2/ts.hpp"
|
|
|
|
#include "opencv2/stitching.hpp"
|
2011-09-13 19:19:40 +08:00
|
|
|
|
2018-11-11 00:53:48 +08:00
|
|
|
#ifdef HAVE_OPENCV_XFEATURES2D
|
|
|
|
#include "opencv2/xfeatures2d/nonfree.hpp"
|
|
|
|
#endif
|
|
|
|
|
2017-06-21 19:33:09 +08:00
|
|
|
namespace cv
|
|
|
|
{
|
|
|
|
|
2018-11-11 00:53:48 +08:00
|
|
|
static inline Ptr<Feature2D> getFeatureFinder(const std::string& name)
|
2017-06-21 19:33:09 +08:00
|
|
|
{
|
|
|
|
if (name == "orb")
|
2018-11-11 00:53:48 +08:00
|
|
|
return ORB::create();
|
|
|
|
#ifdef HAVE_OPENCV_XFEATURES2D
|
2017-06-21 19:33:09 +08:00
|
|
|
else if (name == "surf")
|
2018-11-11 00:53:48 +08:00
|
|
|
return xfeatures2d::SURF::create();
|
|
|
|
#endif
|
2017-06-21 19:33:09 +08:00
|
|
|
else if (name == "akaze")
|
2018-11-11 00:53:48 +08:00
|
|
|
return AKAZE::create();
|
2017-06-21 19:33:09 +08:00
|
|
|
else
|
2018-11-11 00:53:48 +08:00
|
|
|
return Ptr<Feature2D>();
|
2017-06-21 19:33:09 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace cv
|
|
|
|
|
2011-09-13 19:19:40 +08:00
|
|
|
#endif
|