Here is my code for calibration of kinect 1 or kinect2, please see the "kinect_calibration.bat" on how to use the two program to calibrate the kinect1 and kinect2. I think the kinect_calibration_k2 is not workable for extrinsic calibration of kinect2 because the used OpenCV extrinsic calibration function seems not support two cameras with different resolution.
I have no time to clean the code now and in the future.
If your OS is windows, you can use the "kinect_calibration.bat" to do calibration.
The test result is in this link