参考
- ROS 相机标定http://blog.csdn.net/ArtistA/article/details/51125560
- ROS里的标定程序只要使用了OPNCV的标定程序;
opencv 相机标定官网文档http://docs.opencv.org/2.4/doc/tutorials/calib3d/camera_calibration/camera_calibration.html
棋盘格参数
- 焦点个数(长宽方向)8x6,边长0.0435m
标定步骤
-
- ROS下运行摄像头,其中相机发布图像的节点名/Camera/IDS_mono_image
rosrun pubimage pubmono
- 2.运行ROS相机标定程序,开始运行rosrun camera_calibration cameracalibrator.py –size 8x6 –square 0.0435 image:=/Camera/IDS_mono_image camera:=/Camera
出现"service not found "错误,按照添加–no-service-check解决http://www.mamicode.com/info-detail-899605.html
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.0435 image:=/Camera/IDS_mono_image camera:=/Camera --no-service-check
- size参数是焦点个数,如下图
- square 参数是正方形格子的长度,单位米
- image:=的参数是发布图像的节点
- camera:=参数是自定义摄像机名字
-
- 从不同视角对准标相机定板,使得calibration 按钮变绿而且相机运动满足右上角“X,Y,Size,Skew”长条变蓝;
- 4.点击calibrate 按钮计算标定参数,标定结束后,标定UI界面显示的是标定后的图像
-其中链接http://docs.opencv.org/2.4/modules/imgproc/doc/geometric_transformations.html#remap
和http://blog.csdn.net/wangshuailpp/article/details/52953323 中有对内参矩阵和畸变参数的解释;
(‘D = ‘, [-0.2560119141217324, 0.09121820514373571, 0.0008929015537432972, -0.0002949864883705548, 0.0])
(‘K = ‘, [560.745775283255, 0.0, 356.3142864442747, 0.0, 562.0282510615026, 240.27152352754922, 0.0, 0.0, 1.0])
(‘R = ‘, [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
(‘P = ‘, [493.8046875, 0.0, 350.6994767608121, 0.0, 0.0, 533.846435546875, 240.13280532319186, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters
[image]
width
752
height
480
[narrow_stereo]
camera matrix
560.745775 0.000000 356.314286
0.000000 562.028251 240.271524
0.000000 0.000000 1.000000
distortion
-0.256012 0.091218 0.000893 -0.000295 0.000000
rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
projection
493.804688 0.000000 350.699477 0.000000
0.000000 533.846436 240.132805 0.000000
0.000000 0.000000 1.000000 0.000000
- 5.点击save按钮保存标定数据,在/tmp目录下会得到一个压缩包,包含标定用的图像,和标定参数的.txt,.ymal文件
使用校准后的数据在D638的实验结果
时间: 2024-10-07 08:46:05