ubuntu18.04下kinect2相机标定
时间: 2023-12-16 19:24:22 浏览: 133
在Ubuntu18.04下进行Kinect2相机标定,可以按照以下步骤进行:
1. 安装libfreenect2和OpenCV库
```
sudo apt-get install build-essential libturbojpeg libjpeg-turbo8-dev libglfw3-dev libopenni2-dev
git clone https://github.com/OpenKinect/libfreenect2.git
cd libfreenect2
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/freenect2
make && make install
sudo apt-get install libopencv-dev
```
2. 下载calibration_toolbox并编译
```
git clone https://github.com/ethz-asl/kalibr.git
cd kalibr
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/kalibr
make -j4 && make install
```
3. 连接Kinect2相机并运行标定程序
```
roslaunch freenect2_launch freenect2.launch
rosrun kalibr kalibr_calibrate_cameras --target aprilgrid --bag <your_bag_file>.bag --topics /kinect2/qhd/image_color_rect /kinect2/qhd/camera_info --models pinhole-radtan pinhole-radtan --target-size 0.088 --approx-sync 0.1
```
4. 标定结果保存在`~/.ros/camera_info`目录下
阅读全文