Monado OpenXR Runtime
Data Structures | Functions
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:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

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

Functions

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. More...
 

Detailed Description

OpenCV calibration helpers.

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 CameraCalibrationWrapper::distortion_fisheye_mat, CameraCalibrationWrapper::distortion_mat, xrt_size::h, t_camera_calibration::image_size_pixels, CameraCalibrationWrapper::intrinsics_mat, RemapPair::remap_x, RemapPair::remap_y, t_camera_calibration::use_fisheye, and xrt_size::w.

Referenced by StereoRectificationMaps::StereoRectificationMaps().