Kinect calibration

This page refers to the calibration of the intrinsic parameters of both Kinect cameras (RGB and IR), plus the accurate determination of the relative 6D pose between them.

The interactive GUI application kinect-stereo-calib makes it really easy to calibrate a Kinect sensor with a checkerboard, either live or from already grabbed images. See the following video for a demonstration:

Next follows an example calibration file, loadable by the class mrpt::hwdrivers::CKinect (the prefix "CAMERA_" in all the section names can be changed to anything else):

# Calibration file 
# ---------------------------------------------------------
# Left camera (IR/Depth in Kinect) calibration parameters
[CAMERA_PARAMS_LEFT]
resolution = [640 488]
cx         = 314.649173
cy         = 240.160459
fx         = 572.882768
fy         = 542.739980
dist       = [-4.747169e-03 -4.357976e-03 0.000000e+00 0.000000e+00 0.000000e+00]    // The order is: [K1 K2 T1 T2 K3]

# Right camera (RGB in Kinect) calibration parameters
[CAMERA_PARAMS_RIGHT]
resolution = [640 480]
cx         = 322.515987
cy         = 259.055966
fx         = 521.179233
fy         = 493.033034
dist       = [5.858325e-02 3.856792e-02 0.000000e+00 0.000000e+00 0.000000e+00]    // The order is: [K1 K2 T1 T2 K3]

# Relative pose of the right camera wrt to the left camera:
# This assumes that both camera frames are such that +Z points
# forwards, and +X and +Y to the right and downwards.
[CAMERA_PARAMS_LEFT2RIGHT_POSE]
pose_quaternion      = [0.025575 -0.000609 -0.001462 0.999987 0.002038 0.004335 -0.001693]
# ---------------------------------------------------------