Monado OpenXR Runtime
Loading...
Searching...
No Matches
t_camera_models.cpp File Reference

Camera (un)projection functions for various camera models. More...

#include "t_camera_models.hpp"
#include <assert.h>
Include dependency graph for t_camera_models.cpp:

Functions

static void interpret_as_rt8 (const t_camera_calibration &cc, t_camera_model_params &out_params)
 
void t_camera_model_params_from_t_camera_calibration (const t_camera_calibration *cc, t_camera_model_params *out_params)
 
bool t_camera_models_unproject (const t_camera_model_params *dist, const float x, const float y, float *out_x, float *out_y, float *out_z)
 
bool t_camera_models_unproject_and_flip (const t_camera_model_params *dist, const float x, const float y, float *out_x, float *out_y, float *out_z)
 
void t_camera_models_undistort (const t_camera_model_params *dist, const float x, const float y, float *out_x, float *out_y)
 
bool t_camera_models_project (const t_camera_model_params *dist, const float x, const float y, const float z, float *out_x, float *out_y)
 
bool t_camera_models_flip_and_project (const t_camera_model_params *dist, const float x, const float y, const float z, float *out_x, float *out_y)
 

Detailed Description

Camera (un)projection functions for various camera models.

Author
Moshi Turner moshi.nosp@m.turn.nosp@m.er@pr.nosp@m.oton.nosp@m.mail..nosp@m.com
Beyley Cardellio ep1cm.nosp@m.1n10.nosp@m.n123@.nosp@m.gmai.nosp@m.l.com

Some notes: These functions should return exactly the same values as basalt-headers, down to floating point bits.

They were mainly written as an expedient way to stop depending on OpenCV-based (un)projection code in Monado's hand tracking code, and to encourage compiler optimizations through inlining.

Current users:

  • Mercury hand tracking
  • Constellation tracker