#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/calib3d/calib3d.hpp>
using namespace std;
using namespace cv;
void pose_estimation_2d2d
(std::vector<KeyPoint> keypoints1,
std::vector<KeyPoint> keypoints2,
std::vector<DMatch> matches,
Mat& R,Mat & t);
void find_feature_match
(Mat imag1,Mat imag2,
vector<KeyPoint> &keypoints1,
vector<KeyPoint> &keypoints2,
vector<DMatch>& matches);
Point2d pixel2cam ( const Point2d& p, const Mat& K );
int main(int argc, char **argv)
{
/* if(argc !=3){
cout<<"usage:feature_extraction img1 img2"<<endl;
return 1;
}*/
//读取图像
Mat imag1=imread(&#
特征提取、匹配以及位姿计算(2D-2D)--参考视觉SLAM十四讲7.4
最新推荐文章于 2024-03-17 12:01:36 发布
该程序展示了如何利用ORB特征检测器进行2D图像匹配,并通过特征匹配估计两个图像间的相对姿态。首先,ORB检测器用于找出图像的关键点并计算其描述符。接着,BFMatcher进行匹配并筛选有效匹配。最后,通过找到的基础矩阵、本质矩阵和 homography 进行位姿计算。
摘要由CSDN通过智能技术生成