void Features::extract(const cv::DescriptorExtractor& extract, const cv::Mat& img) { extract.compute(img, kpts_, descriptors_); KeyPointsToPoints(kpts_, pts_); // matcher_->add(vector<Mat>(1,descriptors_)); // matcher_->train(); }
void compute_descriptors(cv::Mat &image, vector<ImageFeature> & features, std::string & name, cv::DescriptorExtractor & extractor, cv::Mat &descriptors, std::vector<cv::KeyPoint>& keypoints) { features_to_keypoints(features, keypoints); extractor.compute(image, keypoints, descriptors); }