1#ifndef _CHRONOPTICS_TOF_CALIBRATION_H_
2#define _CHRONOPTICS_TOF_CALIBRATION_H_
4#include <chronoptics/tof/data.h>
12typedef struct tof_point_2d* tof_point_2d_t;
15TOF_EXPORT
void tof_point_2d_delete(tof_point_2d_t ptr);
22TOF_EXPORT int32_t tof_point_2d_row(tof_point_2d_t ptr, tof_error_t *error);
29TOF_EXPORT int32_t tof_point_2d_col(tof_point_2d_t ptr, tof_error_t *error);
33typedef struct tof_calibration* tof_calibration_t;
36TOF_EXPORT
void tof_calibration_delete(tof_calibration_t ptr);
44TOF_EXPORT tof_calibration_t tof_calibration_new_from_disk(
const char* file_location, tof_error_t *error);
51TOF_EXPORT
void tof_calibration_write(
const tof_calibration_t ptr,
const char* file_location, tof_error_t *error);
60TOF_EXPORT
size_t tof_calibration_get_calibrated_frequencies(
const tof_calibration_t ptr,
float* calibrated_frequencies,
size_t capacity, tof_error_t *error);
67TOF_EXPORT
double tof_calibration_get_focal_length_x(
const tof_calibration_t ptr, tof_error_t *error);
74TOF_EXPORT
double tof_calibration_get_focal_length_y(
const tof_calibration_t ptr, tof_error_t *error);
81TOF_EXPORT
double tof_calibration_get_principal_point_x(
const tof_calibration_t ptr, tof_error_t *error);
88TOF_EXPORT
double tof_calibration_get_principal_point_y(
const tof_calibration_t ptr, tof_error_t *error);
95TOF_EXPORT
double* tof_calibration_get_depth_camera_matrix(tof_calibration_t ptr, tof_error_t *error);
102TOF_EXPORT
double* tof_calibration_get_depth_distortion_coefficients(tof_calibration_t ptr, tof_error_t *error);
109TOF_EXPORT
double* tof_calibration_get_rgb_camera_matrix(tof_calibration_t ptr, tof_error_t *error);
116TOF_EXPORT
double* tof_calibration_get_rgb_distortion_coefficients(tof_calibration_t ptr, tof_error_t *error);
123TOF_EXPORT
double* tof_calibration_get_rotation_vector(tof_calibration_t ptr, tof_error_t *error);
130TOF_EXPORT
double* tof_calibration_get_translation_vector(tof_calibration_t ptr, tof_error_t *error);
140TOF_EXPORT tof_point_2d_t tof_transform_3d_to_depth_2d(
float x,
float y,
float z, tof_calibration_t calibration, tof_error_t *error);
150TOF_EXPORT tof_point_2d_t tof_transform_3d_to_color_2d(
float x,
float y,
float z, tof_calibration_t calibration, tof_error_t *error);
162TOF_EXPORT tof_point_2d_t tof_transform_color_2d_to_depth_2d(int32_t row, int32_t col, tof_data_t depth_data, tof_calibration_t calibration, tof_error_t *error);