[英]Camera Calibration with OpenCV: Using the distortion and rotation-translation matrix
[英]How to compute rotation-translation matrix between 2 frames with OpenCV
我想用OpenCV
2帧之间的旋转平移矩阵[R | t]矩阵(参见http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html?highlight=fundamentalmat#camera-calibration-和-3d重建 )
我知道我必须:
1)检测两个帧上的特征(例如,使用SURF
),
2)Matche功能(例如,使用ORB
和BFMatcher
),
3)计算[R | t]矩阵。 内在参数是已知的。
但是,我不知道如何使用OpenCV
完成第三步。 有没有常规/简单的方法来做到这一点?
我的目标是计算相机的轨迹。
您需要使用RANSAC来计算Fundamental或Essential矩阵
OpenCV很好地提供了cv::findFundamentalMat
函数。
然后是从内部参数矩阵A
和基本矩阵F
得到[R|t]
。 我将推荐您从基础矩阵中提取翻译和旋转,以获取更多相关信息。
您可以简单地使用stereoCalibrate,其旋转和平移矩阵分别为R&T。 object_points,l_image_points,r_image_points对象和左/右图像帧中匹配点/要素的坐标。 stereoCalibrate(object_points,l_image_points,r_image_points,LcameraMatrix,LdistCoeffs,RcameraMatrix,RdistCoeffs,imageSize,R,T,E,F);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.