Monado OpenXR Runtime
t_calibration_opencv.hpp File Reference

OpenCV calibration helpers. More...

#include "tracking/t_tracking.h"
#include <opencv2/opencv.hpp>
#include <sys/stat.h>
Include dependency graph for t_calibration_opencv.hpp:

Go to the source code of this file.

Data Structures

struct  xrt::auxiliary::tracking::CameraCalibrationWrapper
 Essential calibration data wrapped for C++. More...
 
struct  xrt::auxiliary::tracking::StereoCameraCalibrationWrapper
 Essential stereo calibration data wrapped for C++. More...
 
struct  xrt::auxiliary::tracking::RemapPair
 An x,y pair of matrices for the remap() function. More...
 
struct  xrt::auxiliary::tracking::ViewRectification
 Rectification, rotation, projection data for a single view in a stereo pair. More...
 
struct  xrt::auxiliary::tracking::StereoRectificationMaps
 Rectification maps as well as transforms for a stereo camera. More...
 
class  xrt::auxiliary::tracking::NormalizedCoordsCache
 Provides cached, precomputed normalized image coordinates from original, distorted ones. More...
 

Functions

static size_t xrt::auxiliary::tracking::t_num_opencv_params_from_distortion_model (const enum t_camera_distortion_model model)
 
RemapPair xrt::auxiliary::tracking::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. More...
 

Detailed Description

Function Documentation

◆ calibration_get_undistort_map()

RemapPair xrt::auxiliary::tracking::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
Todo:
Scale Our intrinsics if the frame size we request

References xrt::auxiliary::tracking::calibration_get_undistort_map(), t_camera_calibration::distortion_model, t_camera_calibration::image_size_pixels, T_DISTORTION_FISHEYE_KB4, and T_DISTORTION_OPENCV_RADTAN_5.

Referenced by xrt::auxiliary::tracking::calibration_get_undistort_map().