接上一篇博客: 博客链接
参考开源实现一和2004年论文(Extrinsic Calibration of a Camera and Laser Range Finder (improves camera calibration))
调试优化总结:
1、标定时使用单个二维码(AprilTag Family 36h11),标定分别测试了6组, 10组, 12组, 15组标定板位姿,利用15组位姿时,标定效果最好(理论上越多越好,但是没有测试更多姿态),将算法标定结果与结构外参对比,旋转角相差1°以内,平移向量相差1~3cm(有点大)。
2、在获取标定板上的激光点时,首先截取激光点前方90度范围(应保证标定板在激光前方90度范围内),减少激光点数量,然后利用RANSAC拟合直线,求出标定板的直线点(即直线内点),最后为了消除与直线内点在同一条直线上的离群点(或噪点),通过从激光点中间点向两边遍历,求相邻激光点距离,若距离大于一个阈值,则移除远离中间点的离群点。
代码如下:
void FilterLaserPoints(
const Eigen::Matrix3Xd& laser_points_origin,
Eigen::Matrix3Xd& laser_points_filtered) {
// filter noise:
// from middle column to both ends to find noise point and remove it
unsigned int forward_col = laser_points_filtered.cols() / 2;
unsigned int backward_col = laser_points_filtered.co