单目相机标定的常用方法,这里主要总结一下ROS和matlab标定工具箱。

ROS相机标定

链接:https://blog.csdn.net/learning_tortosie/article/details/79901255

  需要注意的一点,在使用这句命令行时--size不是整个棋盘格的数量,而是除了外面一圈格子后的棋盘格角点数。

rosrun camera_calibration cameracalibrator.py --size 3x3 --square 0.2 image:=/camera/image_raw camera:=/camera

在这里插入图片描述
例如,上图的棋盘格大小应设置为3x3。

得到的结果如下:

[image]
width
1920
height
1080
[narrow_stereo/left]
camera matrix
122.884138 0.000000 1458.806089
0.000000 127.608417 455.317508
0.000000 0.000000 1.000000
distortion
0.029094 -0.000641 0.012750 -0.030689 0.000000
rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
projection
1.000000 0.000000 0.000000 0.000000
0.000000 1.000000 0.000000 0.000000
0.000000 0.000000 1.000000 0.000000
  • image_width、image_height代表图片的长宽
  • camera_name为摄像头名
  • camera_matrix规定了摄像头的内部参数矩阵
  • distortion_model指定了畸变模型
  • distortion_coefficients指定畸变模型的系数,分别代表k1,k2,p1,p2,k3
  • rectification_matrix为矫正矩阵,一般为单位阵
  • projection_matrix为外部世界坐标到像平面的投影矩阵

matlab标定

  如果使用rosbag录制的数据,先将bag转为图片,可以参考这个链接。
  标定的过程可以参考link。

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐