mirror of
https://github.com/opencv/opencv.git
synced 2026-07-28 14:53:03 +04:00
Merge pull request #25292 from kaingwade:features2d_parts_to_contrib
Features2d cleanup: Move several feature detectors and descriptors to opencv_contrib #25292 features2d cleanup: #24999 The PR moves KAZE, AKAZE, AgastFeatureDetector, BRISK and BOW to opencv_contrib/xfeatures2d. Related PR: opencv/opencv_contrib#3709
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
#include <iostream>
|
||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
||||
#include <opencv2/features2d.hpp>
|
||||
#include "opencv2/xfeatures2d.hpp"
|
||||
#include <opencv2/imgproc.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
@@ -28,7 +30,7 @@ int main(int argc, char* argv[])
|
||||
vector<KeyPoint> kpts1, kpts2;
|
||||
Mat desc1, desc2;
|
||||
|
||||
Ptr<AKAZE> akaze = AKAZE::create();
|
||||
Ptr<xfeatures2d::AKAZE> akaze = xfeatures2d::AKAZE::create();
|
||||
akaze->detectAndCompute(img1, noArray(), kpts1, desc1);
|
||||
akaze->detectAndCompute(img2, noArray(), kpts2, desc2);
|
||||
//! [AKAZE]
|
||||
@@ -96,3 +98,10 @@ int main(int argc, char* argv[])
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int main()
|
||||
{
|
||||
std::cout << "This tutorial code needs the xfeatures2d contrib module to be run." << std::endl;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user