使用camera_calibration对xtion pro live深度相机进行参数标定,rosdep install camera_calibration报错Rosdep cannot find

在图像处理中,一般都涉及相机参数标定,但网上看了好多博客中相机标定步骤挺复杂的,所以特来记录.本文使用的ubuntu系统、ROS Kinetic, xtion深度相机, 使用camera_calibration功能包来进行标定.

1. 先安装camera_calibration功能包,很多博客以及维基教程都是使用 rosdep install camera_calibration 来安装,但是会提示 ERROR: Rosdep cannot find all required resources to answer your query .经过一番搜索好像是因为ros环境变量中所有的路径都没有该功能包,而不是没有source devel/setup.bash,可能你是因为这个原因(可以运行试试).于是查找得到camera_calibration功能包的安装只需运行sudo apt install ros-kinetic-camera-calibration 即可安装.

2. 运行roslaunch openni2_launch openni2.launch驱动xtion深度相机, 视情况而定,如果不需运行驱动文件可以直接使用相机则越过此步骤.

3. 运行 camera_calibration节点, 其中size是方格几列几行(需要减1), 比如我是8*6,则是7*5, square是边长,后面image是所用的图像,camera则是选择图像类型,如depth IR rgb .

rosrun camera_calibration cameracalibrator.py --size 7x5 --square 0.033 image:=/camera/rgb/image_raw camera:=/camera/rgb

4. 运行代码后图像中出现棋盘连线则为稳定情况,此时上下左右移动棋盘格,直至各个方向数据都采集,矫正完成后则点击图片右边的CALIBRATE则可进行接着点击save 和 commit,则可得到文件保存至/tmp/calibrationdata.tar.gz, 同时终端也会输出相机参数.

使用camera_calibration对xtion pro live深度相机进行参数标定,rosdep install camera_calibration报错Rosdep cannot find_第1张图片

使用camera_calibration对xtion pro live深度相机进行参数标定,rosdep install camera_calibration报错Rosdep cannot find_第2张图片

你可能感兴趣的:(使用camera_calibration对xtion pro live深度相机进行参数标定,rosdep install camera_calibration报错Rosdep cannot find)