相机校准与图像去畸变技术详解
1. PnP问题与RANSAC算法
在处理PnP(Perspective-n-Point)问题时,实际上是在寻找一个透视变换,而这个变换可以由四个点完全确定。因此,在RANSAC(Random Sample Consensus)迭代中,初始选择的点数为四个。默认的重投影误差 reprojectionError 对应于每个点与其重投影之间的平均距离为2。
OpenCV提供了 cv::solvePnPRansac() 函数来解决这个问题,其原型如下:
bool cv::solvePnPRansac(
cv::InputArray objectPoints, // Object points (object frame)
cv::InputArray imagePoints, // Found pt locations (img frame)
cv::InputArray cameraMatrix, // 3-by-3 camera matrix
cv::InputArray distCoeffs, // Vector of 4, 5, or 8 coeffs
cv::OutputArray rvec, // Result rotation vector
cv::OutputArray tvec, // Result t
超级会员免费看
订阅专栏 解锁全文
11

被折叠的 条评论
为什么被折叠?



