Feature matching 2d to 3d points. [closed]
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.
this demo: http://docs.opencv.org/master/dc/d2c/...
uses a Mat that hold descriptors of the 3d points. If i had that, I could use this method. BUT, how do I get the descriptors of 3d points??
hello,I have a question.in step 5 Pose estimation using PnP + Ransac ,it just get rvec and tvec through solvePnPRansac , how can I compute camera position?According my understand,camera position just have x,y and z.