diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-03-10 22:57:09 -0700 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-03-11 14:54:29 -0600 |
commit | bc207e7985fc35b521e8ad5945e35498913e86b4 (patch) | |
tree | 817641a50d5408f4625e5a619f5e9fdf2ae0829a /include | |
parent | 6ba96f31c51cbfc8b57cfe87c129eba125bf793d (diff) | |
download | libsurvive-bc207e7985fc35b521e8ad5945e35498913e86b4.tar.gz libsurvive-bc207e7985fc35b521e8ad5945e35498913e86b4.tar.bz2 |
Added code which calculates the error for each calibration type; also made sure to always save the calibration
Diffstat (limited to 'include')
-rw-r--r-- | include/libsurvive/survive_reproject.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/libsurvive/survive_reproject.h b/include/libsurvive/survive_reproject.h new file mode 100644 index 0000000..08d1e96 --- /dev/null +++ b/include/libsurvive/survive_reproject.h @@ -0,0 +1,45 @@ +#pragma once +#include "survive.h" +#include <stdbool.h> +#include <stdlib.h> + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + bool enable[2]; + bool invert[2]; + bool swap; +} survive_calibration_options_config; + +typedef struct { + + survive_calibration_options_config phase, tilt, curve, gibMag, gibPhase; + + bool gibUseSin; + +} survive_calibration_config; + +void survive_calibration_options_config_apply( + const survive_calibration_options_config *option, const FLT *input, + FLT *output); +const survive_calibration_config *survive_calibration_default_config(); + +size_t survive_calibration_config_max_idx(); +survive_calibration_config survive_calibration_config_create_from_idx(size_t v); +size_t +survive_calibration_config_index(const survive_calibration_config *config); + +void survive_reproject(const SurviveContext *ctx, int lighthouse, FLT *point3d, + FLT *out); +void survive_reproject_from_pose(const SurviveContext *ctx, int lighthouse, + const SurvivePose *pose, FLT *point3d, + FLT *out); +void survive_reproject_from_pose_with_config( + const SurviveContext *ctx, const survive_calibration_config *config, + int lighthouse, const SurvivePose *pose, const FLT *point3d, FLT *out); + +#ifdef __cplusplus +} +#endif |