Opencv 3.4 中的EPnp位姿估计算法
这里只介绍opencv3.4 中Epnp算法的头文件,具体内容可以参考论文《EPnP: An Accurate O(n) Solution to the PnP Problem》+opencv3.4 源代码。 源代码+参考文论+部分ppt已经传到csdn。 #ifndef epnp_h #define epnp_h #include "precomp.hpp" #include "opencv2/core/core_c.h" namespace cv { class epnp { public: /* max 注释 * 函数功能:ePnP算法的初始化构造函数,ePnP求解最少需要4对点,而且是相机内参已知 * * 参数: * [in] cameraMatrix 相机内参 * [in] opoints 参考点在世界坐标系中的点,至少4个点-------float or double * [in] ipoints 参考点在相机图像上的投影点坐标,至少4个点-------float or double * 返回值: * */ epnp(const cv::Mat& cameraMatrix, const cv::Mat& opoints, const cv::Mat& ipoints); ~epnp(); // 此函数没有实现---没有使用 void add_correspondence