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;
14typedef struct tof_point_2d const* tof_point_2d_ct;
17TOF_EXPORT
void tof_point_2d_delete(tof_point_2d_t ptr);
24TOF_EXPORT int32_t tof_point_2d_row(tof_point_2d_t ptr, tof_error_t *error);
31TOF_EXPORT int32_t tof_point_2d_col(tof_point_2d_t ptr, tof_error_t *error);
35typedef struct tof_calibration* tof_calibration_t;
37typedef struct tof_calibration const* tof_calibration_ct;
40TOF_EXPORT
void tof_calibration_delete(tof_calibration_t ptr);
48TOF_EXPORT tof_calibration_t tof_calibration_new_from_disk(
const char* file_location, tof_error_t *error);
55TOF_EXPORT
void tof_calibration_write(tof_calibration_ct ptr,
const char* file_location, tof_error_t *error);
64TOF_EXPORT
size_t tof_calibration_get_calibrated_frequencies(tof_calibration_ct ptr,
float* calibrated_frequencies,
size_t capacity, tof_error_t *error);
71TOF_EXPORT
double tof_calibration_get_focal_length_x(tof_calibration_ct ptr, tof_error_t *error);
78TOF_EXPORT
double tof_calibration_get_focal_length_y(tof_calibration_ct ptr, tof_error_t *error);
85TOF_EXPORT
double tof_calibration_get_principal_point_x(tof_calibration_ct ptr, tof_error_t *error);
92TOF_EXPORT
double tof_calibration_get_principal_point_y(tof_calibration_ct ptr, tof_error_t *error);
99TOF_EXPORT
const double* tof_calibration_get_depth_camera_matrix(tof_calibration_ct ptr, tof_error_t *error);
108TOF_EXPORT
size_t tof_calibration_get_depth_distortion_coefficients(tof_calibration_ct ptr,
double* distortion_coefficients,
size_t capacity, tof_error_t *error);
115TOF_EXPORT
const double* tof_calibration_get_rgb_camera_matrix(tof_calibration_ct ptr, tof_error_t *error);
122TOF_EXPORT
const double* tof_calibration_get_rgb_distortion_coefficients(tof_calibration_ct ptr, tof_error_t *error);
129TOF_EXPORT
const double* tof_calibration_get_rotation_vector(tof_calibration_ct ptr, tof_error_t *error);
136TOF_EXPORT
const double* tof_calibration_get_translation_vector(tof_calibration_ct ptr, tof_error_t *error);
146TOF_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);
156TOF_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);
168TOF_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);