Fixed SIFT build errors with OpenCV 4.3.0

This commit is contained in:
matlabbe
2020-05-09 12:29:24 -04:00
parent 88418c7d9a
commit 328c7236b5
5 changed files with 153 additions and 10 deletions
+4
View File
@@ -121,7 +121,11 @@ int main(int argc, char * argv[])
////////////////////////////
// EXTRACT KEYPOINTS
////////////////////////////
#if CV_MAJOR_VERSION < 4 || (CV_MAJOR_VERSION == 4 and CV_MINOR_VERSION < 3)
cv::Ptr<cv::xfeatures2d::SIFT> sift = cv::xfeatures2d::SIFT::create();
#else
cv::Ptr<cv::SIFT> sift = cv::SIFT::create();
#endif
sift->detect(objectImg, objectKeypoints);
sift->detect(sceneImg, sceneKeypoints);