This program calibrates 2 Azure Kinect cameras, saves their intrinsic camera matrices, the extrinsic camera matrices, and the depth and color images.
The following (non-standard) libraries are required:
OpenCV (only tested with version 4.7.0)
k4a (only tested with 1.4.1, also known as the Microsoft Azure Kinect sensor SDK, can be installed using NuGet)
After compiling the executable has to be run with one argument, a 0
or a 1
If the argument 1
is passed the program will run with stereo calibration and generate a new extrinsic.json
If the argument 0
is passed the program will run using the previously generated stereo calibration data (extrinsic.json) and thus skip the stereo calibration process
Upon running the executable the captures that will be used for the point cloud(s) are immediately made
Subsequently the program pauses, and explains the calibration process, before taking a capture for the calibration the user has to give input
After 50 captures the calibration is complete
The chessboard used is from: link
NOTE: the value of the CHESSBOARD_SQUARE_SIZE define at the top of the testing-kinect.cpp file has to match the square size (in mm) of the chessboard being used for calibration
The program generates the following output, depending on how many cameras are connected, index represents the camera (index is 0 up to amount of cameras-1):
color[index].jpg the color image of camera [index]
depth[index].png the depth image of camera [index]
intrinsic[index].json the camera intrinsic matrix of camera [index]
extrinsic.json the camera extrinsic matrices, for the transformation fom sub camera to master camera