edit: I was looking at the wrong OpenCV2 code example, there is no FeatureDetector::create
in OpenCV3 - this was confusing me.
Hey n
You have also the OpenCV documentation to have a list of OpenCV features:
What I do to know if the feature is available only in keypoints detection or descriptor extraction or both is to read the corresponding paper linked in the documentation. It allows also to have a brief description of the features (for example if it is a binary descriptor, main advantages, etc.)
Other solution is to test each feature:
detect()
is ok (no exception thrown) ==> feature detectioncompute()
is ok ==> feature extractiondetectAndCompute()
is ok ==> bothMaybe a more optimal solution exists...
Anyway, from my knowledge (feel free to correct me if I am wrong):
Also with OpenCV 3.1, the code is:
cv::Ptr<cv::Feature2D> kaze = cv::KAZE::create();
std::vector<cv::KeyPoint> kpts;
cv::Mat descriptors;
kaze->detect(matImg, kpts);
kaze->compute(matImg, kpts, descriptors);
kaze->detectAndCompute(matImg, cv::noArray(), kpts, descriptors);
cv::Ptr<cv::Feature2D> daisy = cv::xfeatures2d::DAISY::create(); //Contrib
To know which norm type to use:
std::cout << "AKAZE: " << akaze->descriptorType() << " ; CV_8U=" << CV_8U << std::endl;
std::cout << "AKAZE: " << akaze->defaultNorm() << " ; NORM_HAMMING=" << cv::NORM_HAMMING << std::endl;
Finally, why
No more features2d::create?