Monado OpenXR Runtime
Functions
t_file.cpp File Reference

Handling of files and calibration data. More...

#include "tracking/t_calibration_opencv.hpp"
#include "util/u_misc.h"
Include dependency graph for t_file.cpp:

Functions

RemapPair calibration_get_undistort_map (t_camera_calibration &calib, cv::InputArray rectify_transform_optional, cv::Mat new_camera_matrix_optional)
 Prepare undistortion/normalization remap structures for a rectilinear or fisheye image. More...
 
bool t_stereo_camera_calibration_load_v1 (FILE *calib_file, struct t_stereo_camera_calibration **out_data)
 Load stereo calibration data from a given file. More...
 
bool t_file_save_raw_data (FILE *calib_file, struct t_stereo_camera_calibration *data)
 
bool t_stereo_camera_calibration_load_v1_hack (struct t_stereo_camera_calibration **out_data)
 Load a stereo calibration struct from a hardcoded place. More...
 
bool t_file_save_raw_data_hack (struct t_stereo_camera_calibration *data)
 Save raw calibration data to file, hack until prober has storage for such things. More...
 

Detailed Description

Handling of files and calibration data.

Author
Pete Black pblac.nosp@m.k@co.nosp@m.llabo.nosp@m.ra.c.nosp@m.om
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m
Ryan Pavlik ryan..nosp@m.pavl.nosp@m.ik@co.nosp@m.llab.nosp@m.ora.c.nosp@m.om

Function Documentation

◆ calibration_get_undistort_map()

RemapPair calibration_get_undistort_map ( t_camera_calibration calib,
cv::InputArray  rectify_transform_optional = cv::noArray(),
cv::Mat  new_camera_matrix_optional = cv::Mat() 
)

Prepare undistortion/normalization remap structures for a rectilinear or fisheye image.

Parameters
calibA single camera calibration structure.
rectify_transform_optionalA rectification transform to apply, if desired.
new_camera_matrix_optionalUnlike OpenCV, the default/empty matrix here uses the input camera matrix as your output camera matrix.
Todo:
Scale Our intrinsics if the frame size we request

References t_camera_calibration::image_size_pixels, and t_camera_calibration::use_fisheye.

Referenced by StereoRectificationMaps::StereoRectificationMaps().

◆ t_file_save_raw_data_hack()

bool t_file_save_raw_data_hack ( struct t_stereo_camera_calibration data)

Save raw calibration data to file, hack until prober has storage for such things.

◆ t_stereo_camera_calibration_load_v1()

bool t_stereo_camera_calibration_load_v1 ( FILE *  calib_file,
struct t_stereo_camera_calibration **  out_data 
)

Load stereo calibration data from a given file.

References t_stereo_camera_calibration_alloc().

Referenced by t_stereo_camera_calibration_load_v1_hack().

◆ t_stereo_camera_calibration_load_v1_hack()

bool t_stereo_camera_calibration_load_v1_hack ( struct t_stereo_camera_calibration **  out_data)

Load a stereo calibration struct from a hardcoded place.

Todo:
256 maybe not enough
Todo:
Use multiple env vars?
Todo:
Hardcoded 256

References t_stereo_camera_calibration_load_v1().