···13131414#include "xrt/xrt_frame.h"
1515#include "util/u_misc.h"
1616+#include "cjson/cJSON.h"
16171718#include <stdio.h>
1819···165166t_stereo_camera_calibration_dump(struct t_stereo_camera_calibration *c);
166167167168/*!
168168- * Load stereo calibration data from a given file.
169169+ * Load stereo calibration data from a given file in v1 format (binary).
169170 *
170171 * @relates t_stereo_camera_calibration
171172 */
···173174t_stereo_camera_calibration_load_v1(FILE *calib_file, struct t_stereo_camera_calibration **out_data);
174175175176/*!
176176- * Save the given stereo calibration data to the given file.
177177+ * Save the given stereo calibration data to the given file in v1 format (binary).
177178 *
178179 * @relates t_stereo_camera_calibration
179180 */
180181bool
181182t_stereo_camera_calibration_save_v1(FILE *calib_file, struct t_stereo_camera_calibration *data);
183183+184184+/*!
185185+ * Parse the json object in v2 format into stereo calibration data.
186186+ *
187187+ * @relates t_stereo_camera_calibration
188188+ */
189189+bool
190190+t_stereo_camera_calibration_from_json_v2(cJSON *json, struct t_stereo_camera_calibration **out_data);
191191+192192+/*!
193193+ * Convert the given stereo calibration data into a json object in v2 format.
194194+ *
195195+ * @relates t_stereo_camera_calibration
196196+ */
197197+bool
198198+t_stereo_camera_calibration_to_json_v2(cJSON **out_json, struct t_stereo_camera_calibration *data);
199199+200200+201201+/*!
202202+ * Load stereo calibration data from a given file path.
203203+ *
204204+ * @relates t_stereo_camera_calibration
205205+ */
206206+bool
207207+t_stereo_camera_calibration_load(const char *calib_path, struct t_stereo_camera_calibration **out_data);
208208+209209+/*!
210210+ * Save the given stereo calibration data to the given file path.
211211+ *
212212+ * @relates t_stereo_camera_calibration
213213+ */
214214+bool
215215+t_stereo_camera_calibration_save(const char *calib_path, struct t_stereo_camera_calibration *data);
182216183217184218/*