1 | initial version |
Please note that the detector object detects and the descriptor object computes the descriptors:
// Define features detector
cv::Ptr<cv::FastFeatureDetector> detector = cv::FastFeatureDetector::create(10, true);
// Detect the keypoints
std::vector<cv::KeyPoint> keypoints1, keypoints2;
detector->detect(im1, keypoints1);
detector->detect(im2, keypoints2);
// Compute the keypoints descriptors
cv::Mat descriptors1, descriptors2;
cv::Ptr<cv::xfeatures2d::BriefDescriptorExtractor> brief = cv::xfeatures2d::BriefDescriptorExtractor::create(32);
brief->compute(im1, keypoints1, descriptors1);
brief->compute(im2, keypoints2, descriptors2);