I am attempting a solvePnPRansac implementation, and have coordinates saved as:
std::vector<cv::KeyPoint> Keypoints;
std::vector<Point3f> points3d;
I need to feature match these vectors to get the corresponding matches and store them in:
std::vector<cv::DMatch> pnp_matches;
How best to go about this?
to feature match images i could do:
FastFeatureDetector detector(threshold);
detector.detect(img1, keypoints1);
detector.detect(img2, keypoints2);
OrbDescriptorExtractor extractor;
extractor.compute(img1, keypoints1, descriptors1);
extractor.compute(img2, keypoints2, descriptors2);
BFMatcher matcher(NORM_L2);
matcher.match(descriptors1, descriptors2, matches);
But what approach do i need when matching 2d to 3d correspondences?
thanks.