【SLAM】【ROS】摄像头标定camera calibration
第一步:先准备一张标定板
(下图中间是6x4个角点,角点请看下边实验中的彩线点。实际打印的A4纸一个格子是4cm )
第二步:知道文件夹运行位置
rostopic list
/image_view/output
/image_view/parameter_descriptions
/image_view/parameter_updates
/rosout
/rosout_agg
/usb_cam/camera_info
/usb_cam/image_raw
/usb_cam/image_raw/compressed
/usb_cam/image_raw/compressed/parameter_descriptions
/usb_cam/image_raw/compressed/parameter_updates
/usb_cam/image_raw/compressedDepth
/usb_cam/image_raw/compressedDepth/parameter_descriptions
/usb_cam/image_raw/compressedDepth/parameter_updates
/usb_cam/image_raw/theora
/usb_cam/image_raw/theora/parameter_descriptions
/usb_cam/image_raw/theora/parameter_updates
第三步:运行标定程序
注意下面这句话,不要生搬硬套,要根据实际调整!!!
rosrun camera_calibration cameracalibrator.py --size 6x4 --square 0.04 image:=/usb_cam/image_raw camera:=/usb_cam
拿着标定板移动,它会自动识别然后标定出6*4个点,这就是刚刚为什么是6*4的原因了
大概标定出几十个后,左侧第一个CALIBRATE按钮会亮起来
点击CALIBRATE按钮,此时会变灰色图像,耐心等待,不是死机
点击SAVE,COMMIT按钮
窗口提示1
[image]
width
640height
480[narrow_stereo]
camera matrix
1275.773525 0.000000 328.646812
0.000000 1350.885244 -18.289759
0.000000 0.000000 1.000000distortion
0.444253 -0.058494 -0.131486 0.004057 0.000000rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000projection
1302.730957 0.000000 329.148206 0.000000
0.000000 1264.319214 -27.245782 0.000000
0.000000 0.000000 1.000000 0.000000
窗口提示2
[ INFO] [1571392954.109543476]: writing calibration data to /home/user/.ros/camera_info/head_camera.yaml
标定文件
参考文献:
https://blog.csdn.net/heyijia0327/article/details/43538695
文章来源: kings.blog.csdn.net,作者:人工智能博士,版权归原作者所有,如需转载,请联系作者。
原文链接:kings.blog.csdn.net/article/details/102629065
- 点赞
- 收藏
- 关注作者
评论(0)