使用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/rgb4. 運行代碼后圖像中出現棋盤連線則為穩定情況,此時上下左右移動棋盤格,直至各個方向數據都采集,矯正完成后則點擊圖片右邊的CALIBRATE則可進行接著點擊save 和 commit,則可得到文件保存至/tmp/calibrationdata.tar.gz, 同時終端也會輸出相機參數.
總結
以上是生活随笔為你收集整理的使用camera_calibration对xtion pro live深度相机进行参数标定,rosdep install camera_calibration报错Rosdep cannot find的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 备忘录--相关操作
- 下一篇: ROS服务通信机制原理及示例代码