【SLAM】【ROS】摄像头标定camera calibration

第一步:先准备一张标定板

(下图中间是6x4个角点,角点请看下边实验中的彩线点。实际打印的A4纸一个格子是4cm )

【SLAM】【ROS】摄像头标定camera calibration_第1张图片

第二步:知道文件夹运行位置

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

 

【SLAM】【ROS】摄像头标定camera calibration_第2张图片

第三步:运行标定程序

注意下面这句话,不要生搬硬套,要根据实际调整!!!

rosrun camera_calibration cameracalibrator.py --size 6x4 --square 0.04 image:=/usb_cam/image_raw camera:=/usb_cam

拿着标定板移动,它会自动识别然后标定出6*4个点,这就是刚刚为什么是6*4的原因了

大概标定出几十个后,左侧第一个CALIBRATE按钮会亮起来

【SLAM】【ROS】摄像头标定camera calibration_第3张图片

点击CALIBRATE按钮,此时会变灰色图像,耐心等待,不是死机

点击SAVE,COMMIT按钮

【SLAM】【ROS】摄像头标定camera calibration_第4张图片

 窗口提示1

【SLAM】【ROS】摄像头标定camera calibration_第5张图片

 

[image]

width
640

height
480

[narrow_stereo]

camera matrix
1275.773525 0.000000 328.646812
0.000000 1350.885244 -18.289759
0.000000 0.000000 1.000000

distortion
0.444253 -0.058494 -0.131486 0.004057 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
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

标定文件 

【SLAM】【ROS】摄像头标定camera calibration_第6张图片

参考文献:

https://blog.csdn.net/heyijia0327/article/details/43538695

你可能感兴趣的:(SLAM,ROS)