microsoft/Azure-Kinect-Sensor-SDK

Is there a template/example of the JSON file for raw calibration?

rafaelatimoteo opened this issue · 0 comments

The calibration_registration example in the SDK returns a JSON file for the raw calibration of two cameras which would make sense to be used as the first argument in the following function:

k4a_result_t k4a_calibration_get_from_raw (char * raw_calibration, size_t raw_calibration_size, const k4a_depth_mode_t depth_mode, const k4a_color_resolution_t color_resolution, k4a_calibration_t * calibration)

The problem is that when giving the JSON file's content resulting from the calibration_registration example, it eventually gives an error saying the "Location" item is not found in the file - and indeed, that item is not included in the JSON. I've gone through the k4a.c code and the calibration.c code to try and understand what they look for in the file and everything seems right except for this "Location" item. There is no template or anything saying what this JSON file should contain besides the output that the calibration_registration example gives, nor is there anything explaining what the "Location" item refers to... the lack of documentation regarding this is very upsetting.

To give some context: my goal is to do the calibration transformations (translation and rotation) just before generating point clouds for both cameras, since my goal is to have them fused into one. So, instead of using the normal calibration function, I'm trying to use the k4a_calibration_get_from_raw in order to perform the transformation in the calibration of the devices. Any advice is welcome since I've never seen any example in which this function is used.

Does anyone know something about this JSON file format? I would really appreciate the help :)

Thanks,
Rafaela