mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
features2d(sift): move SIFT tests / headers / build fixes
This commit is contained in:
@@ -323,15 +323,8 @@ void createFeatures(const std::string &featureName, int numKeypoints, cv::Ptr<cv
|
||||
}
|
||||
else if (featureName == "SIFT")
|
||||
{
|
||||
#if defined (OPENCV_ENABLE_NONFREE) && defined (HAVE_OPENCV_XFEATURES2D)
|
||||
detector = cv::xfeatures2d::SIFT::create();
|
||||
descriptor = cv::xfeatures2d::SIFT::create();
|
||||
#else
|
||||
std::cout << "xfeatures2d module is not available or nonfree is not enabled." << std::endl;
|
||||
std::cout << "Default to ORB." << std::endl;
|
||||
detector = cv::ORB::create(numKeypoints);
|
||||
descriptor = cv::ORB::create(numKeypoints);
|
||||
#endif
|
||||
detector = cv::SIFT::create();
|
||||
descriptor = cv::SIFT::create();
|
||||
}
|
||||
else if (featureName == "SURF")
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ FLANN_INDEX_LSH = 6
|
||||
def init_feature(name):
|
||||
chunks = name.split('-')
|
||||
if chunks[0] == 'sift':
|
||||
detector = cv.xfeatures2d.SIFT_create()
|
||||
detector = cv.SIFT_create()
|
||||
norm = cv.NORM_L2
|
||||
elif chunks[0] == 'surf':
|
||||
detector = cv.xfeatures2d.SURF_create(800)
|
||||
|
||||
Reference in New Issue
Block a user