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"
|
2024-10-10 22:10:22 +08:00
|
|
|
#include "opencv2/xfeatures2d.hpp"
|
2018-11-11 00:53:48 +08:00
|
|
|
#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();
|
2024-10-10 22:10:22 +08:00
|
|
|
else if (name == "sift")
|
|
|
|
return SIFT::create();
|
2021-02-09 21:54:06 +08:00
|
|
|
#if defined(HAVE_OPENCV_XFEATURES2D) && defined(OPENCV_ENABLE_NONFREE)
|
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
|
2024-10-10 22:10:22 +08:00
|
|
|
#if defined(HAVE_OPENCV_XFEATURES2D)
|
2017-06-21 19:33:09 +08:00
|
|
|
else if (name == "akaze")
|
2024-10-10 22:10:22 +08:00
|
|
|
return xfeatures2d::AKAZE::create();
|
|
|
|
#endif
|
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
|