1. 概述
简单介绍如何使用ROS节点程序进行针孔模型相机标定的步骤,供自己以后参考,同时希望给大家带来帮助。
2. 准备
- 提前准备好
棋盘格
并打印出来,可以使用A4纸打印,然后粘贴在纸板上,注意粘贴时贴紧纸板,确保位于纸张上的点位于同一平面
。
棋盘格图片下载。 - 保证包含相机图像的topic能够正常发布信息,并确保每张图片包含
完整的棋盘格
信息,并不断旋转移动
棋盘格,保证采取到不同位置下
的棋盘格信息。 - 确保所使用的ROS带有标定节点程序
rosrun camera_calibration cameracalibrator.py
。可以设置较多参数,具体如下
rosrun camera_calibration cameracalibrator.py -h
Usage: cameracalibrator.py --size SIZE1 --square SQUARE1 [ --size SIZE2 --square SQUARE2 ]
Options:
-h, --help show this help message and exit
-c CAMERA_NAME, --camera_name=CAMERA_NAME
name of the camera to appear in the calibration file
Chessboard Options:
You must specify one or more chessboards as pairs of --size and
--square options.
-p PATTERN, --pattern=PATTERN
calibration pattern to detect - 'chessboard',
'circles', 'acircles'
-s SIZE, --size=SIZE
chessboard size as NxM, counting interior corners
(e.g. a standard chessboard is 7x7)
-q SQUARE, --square=SQUARE
che