Kinect V2 Camera Calibration

Install driver libfreenect2 and IAI Kinect2 for OpenCV 4 under ros before camera calibration
Install Kinect v2 driver libfreenect2 tutorial
Install IAI Kinect2 for OpenCV 4 tutorial under ros
Why install IAI Kinect2 for OpenCV 4 instead of the official library, this is Because using the official library for calibration will report an error and cannot be calibrated, see the above tutorial for details

calibration

The calibration process is carried out according to the steps in the official tutorial, the tutorial link

Download calibration board

I chose chess5x7x0.03, consistent with the tutorial, and then printed it out and pasted it on a flat surface

Calibration procedure
  1. Open a window to start the bridge noderosrun kinect2_bridge kinect2_bridge _fps_limit:=2
  2. Create a new folder for storing calibration data, and the path can be modified according to the actual situationmkdir ~/kinect_cal_data; cd ~/kinect_cal_data
  3. Take colora picture rosrun kinect2_calibration kinect2_calibration chess5x7x0.03 record color, if it prompts that the package cannot be found, click first source, and the corresponding sourcepath should be changed to the subdirectory where you store it iai_kinect2_opencv4, catkin_wsbecause the location where you save the calibration data may not be catkin_wsin the subdirectory, eg: source ~/catkin_ws/devel/setup.bash. Take at least 100 photos
  4. calibration internal reference,rosrun kinect2_calibration kinect2_calibration chess5x7x0.03 calibrate color
  5. Take photosir , rosrun kinect2_calibration kinect2_calibration chess5x7x0.03 record ir, at least 100 photos
  6. Calibrate irthe internal parameters of the camera,rosrun kinect2_calibration kinect2_calibration chess5x7x0.03 calibrate ir
  7. Take colorand irsync photos, rosrun kinect2_calibration kinect2_calibration chess5x7x0.03 record sync, take at least 100 photos
  8. Calibration of external parameters,rosrun kinect2_calibration kinect2_calibration chess5x7x0.03 calibrate sync
  9. calibrated depth measurement,rosrun kinect2_calibration kinect2_calibration chess5x7x0.03 calibrate depth
  10. View the device number of the camera, roslaunch kinect2_bridge kinect2_bridge.launch, you can see the device number from the output content

image.png

  1. kinect2_bridge/dataCreate a new calibration file for the device underroscd kinect2_bridge/data; mkdir 008426164947
  2. Copy , , , into kinect2_cal_data_ _calib_color.yamlcalib_depth.yamlcalib_ir.yamlcalib_pose.yaml008426164947
verify
cd ~/catkin_ws
source devel/setup.bash
roslaunch kinect2_bridge kinect2_bridge.launch
# 新开窗口
rosrun kinect2_viewer kinect2_viewer kinect2 sd cloud

Guess you like

Origin blog.csdn.net/weixin_48319333/article/details/130441929