|
Monado OpenXR Runtime
|
Camera (un)projection C API for various camera models. More...
#include "tracking/t_tracking.h"
Go to the source code of this file.
Data Structures | |
| struct | t_camera_calibration_kb4_params_float |
| Floating point parameters for T_DISTORTION_FISHEYE_KB4. More... | |
| struct | t_camera_calibration_rt8_params_float |
Floating point parameters for T_DISTORTION_OPENCV_RADTAN_8, also including metric_radius. More... | |
| struct | t_camera_model_params |
| Floating point calibration data for a single calibrated camera. More... | |
Functions | |
| void | t_camera_model_params_from_t_camera_calibration (const struct t_camera_calibration *cc, struct t_camera_model_params *out_params) |
Takes a t_camera_calibration through cc, and returns a t_camera_model_params that shadows cc 's parameters through out_params. | |
| bool | t_camera_models_unproject (const struct t_camera_model_params *dist, const float x, const float y, float *out_x, float *out_y, float *out_z) |
Takes a 2D image-space point through x and y, unprojects it to a normalized 3D direction, and returns the result through out_x, out_y and out_z. | |
| bool | t_camera_models_unproject_and_flip (const struct t_camera_model_params *dist, const float x, const float y, float *out_x, float *out_y, float *out_z) |
Takes a 2D image-space point through x and y, unprojects it to a normalized 3D direction, flips its Y and Z values (performing a coordinate space transform from +Z forward -Y up to -Z forward +Y up) and returns the result through out_x, out_y and out_z. | |
| void | t_camera_models_undistort (const struct t_camera_model_params *dist, const float x, const float y, float *out_x, float *out_y) |
Takes a distorted 2D point through x and y and computes the undistorted point into out_x and out_y. | |
| bool | t_camera_models_project (const struct t_camera_model_params *dist, const float x, const float y, const float z, float *out_x, float *out_y) |
Takes a 3D point through x, y, and z, projects it into image space, and returns the result through out_x and out_y. | |
| bool | t_camera_models_flip_and_project (const struct t_camera_model_params *dist, const float x, const float y, const float z, float *out_x, float *out_y) |
Takes a 3D point through x, y, and z, flips its Y and Z values (performing a coordinate space transform from -Z forward +Y up to +Z forward -Y up), projects it into image space, and returns the result through out_x and out_y. | |
Camera (un)projection C API for various camera models.
| void t_camera_model_params_from_t_camera_calibration | ( | const struct t_camera_calibration * | cc, |
| struct t_camera_model_params * | out_params | ||
| ) |
Takes a t_camera_calibration through cc, and returns a t_camera_model_params that shadows cc 's parameters through out_params.
| bool t_camera_models_flip_and_project | ( | const struct t_camera_model_params * | dist, |
| const float | x, | ||
| const float | y, | ||
| const float | z, | ||
| float * | out_x, | ||
| float * | out_y | ||
| ) |
Takes a 3D point through x, y, and z, flips its Y and Z values (performing a coordinate space transform from -Z forward +Y up to +Z forward -Y up), projects it into image space, and returns the result through out_x and out_y.
| bool t_camera_models_project | ( | const struct t_camera_model_params * | dist, |
| const float | x, | ||
| const float | y, | ||
| const float | z, | ||
| float * | out_x, | ||
| float * | out_y | ||
| ) |
Takes a 3D point through x, y, and z, projects it into image space, and returns the result through out_x and out_y.
| void t_camera_models_undistort | ( | const struct t_camera_model_params * | dist, |
| const float | x, | ||
| const float | y, | ||
| float * | out_x, | ||
| float * | out_y | ||
| ) |
Takes a distorted 2D point through x and y and computes the undistorted point into out_x and out_y.
| bool t_camera_models_unproject | ( | const struct t_camera_model_params * | dist, |
| const float | x, | ||
| const float | y, | ||
| float * | out_x, | ||
| float * | out_y, | ||
| float * | out_z | ||
| ) |
Takes a 2D image-space point through x and y, unprojects it to a normalized 3D direction, and returns the result through out_x, out_y and out_z.
| bool t_camera_models_unproject_and_flip | ( | const struct t_camera_model_params * | dist, |
| const float | x, | ||
| const float | y, | ||
| float * | out_x, | ||
| float * | out_y, | ||
| float * | out_z | ||
| ) |
Takes a 2D image-space point through x and y, unprojects it to a normalized 3D direction, flips its Y and Z values (performing a coordinate space transform from +Z forward -Y up to -Z forward +Y up) and returns the result through out_x, out_y and out_z.