15 #error "This header is C++-only." 20 #include <opencv2/opencv.hpp> 34 const cv::Size image_size_pixels_cv;
35 cv::Mat_<double> intrinsics_mat;
36 cv::Mat_<double> distortion_mat;
37 cv::Mat_<double> distortion_fisheye_mat;
56 return intrinsics_mat.size() == cv::Size(3, 3) &&
57 (
double *)intrinsics_mat.data ==
60 distortion_mat.size() ==
62 (
double *)distortion_mat.data == &(base.
distortion[0]) &&
64 distortion_fisheye_mat.size() == cv::Size(1, 4) &&
65 (
double *)distortion_fisheye_mat.data ==
81 cv::Mat_<double> camera_translation_mat;
82 cv::Mat_<double> camera_rotation_mat;
83 cv::Mat_<double> camera_essential_mat;
84 cv::Mat_<double> camera_fundamental_mat;
105 t_stereo_camera_calibration_reference(&temp, stereo);
118 t_stereo_camera_calibration_reference(&tmp, NULL);
123 t_stereo_camera_calibration_reference(&base, NULL);
129 return camera_translation_mat.size() == cv::Size(1, 3) &&
130 (
double *)camera_translation_mat.data ==
133 camera_rotation_mat.size() == cv::Size(3, 3) &&
134 (
double *)camera_rotation_mat.data ==
137 camera_essential_mat.size() == cv::Size(3, 3) &&
138 (
double *)camera_essential_mat.data ==
141 camera_fundamental_mat.size() == cv::Size(3, 3) &&
142 (
double *)camera_fundamental_mat.data ==
175 cv::InputArray rectify_transform_optional = cv::noArray(),
176 cv::Mat new_camera_matrix_optional = cv::Mat());
187 cv::Mat rotation_mat = {};
188 cv::Mat projection_mat = {};
201 cv::Mat disparity_to_depth_mat = {};
234 const cv::Matx33d &intrinsics,
235 const cv::Matx<double, 5, 1> &distortion);
249 const cv::Matx33d &intrinsics,
250 const cv::Matx<double, 5, 1> &distortion,
251 const cv::Matx33d &rectification,
252 const cv::Matx33d &new_camera_matrix);
268 const cv::Matx33d &intrinsics,
269 const cv::Matx<double, 5, 1> &distortion,
270 const cv::Matx33d &rectification,
271 const cv::Matx<double, 3, 4> &new_projection_matrix);
284 const cv::Mat &intrinsics,
285 const cv::Mat &distortion);
296 getNormalizedImageCoords(cv::Point2f origCoords)
const;
305 getNormalizedVector(cv::Point2f origCoords)
const;
308 cv::Mat_<float> cacheX_;
309 cv::Mat_<float> cacheY_;
struct t_camera_calibration view[2]
Calibration of individual views/sensor.
Definition: t_tracking.h:117
Essential stereo calibration data wrapped for C++.
Definition: t_calibration_opencv.hpp:77
double distortion[XRT_DISTORTION_MAX_DIM]
Rectilinear distortion coefficients: k1, k2, p1, p2[, k3[, k4, k5, k6[, s1, s2, s3, s4]].
Definition: t_tracking.h:99
Rectification maps as well as transforms for a stereo camera.
Definition: t_calibration_opencv.hpp:196
Essential calibration data for a single camera, or single lens/sensor of a stereo camera...
Definition: t_tracking.h:89
double camera_rotation[3][3]
Rotation matrix from first to second in the stereo pair.
Definition: t_tracking.h:122
void t_stereo_camera_calibration_alloc(struct t_stereo_camera_calibration **out_c)
Allocates a new stereo calibration data, unreferences the old calib.
Definition: t_data_utils.c:17
double camera_translation[3]
Translation from first to second in the stereo pair.
Definition: t_tracking.h:120
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.
Definition: t_file.cpp:39
double distortion_fisheye[4]
Fisheye camera distortion coefficients.
Definition: t_tracking.h:102
Provides cached, precomputed access to normalized image coordinates from original, distorted ones.
Definition: t_calibration_opencv.hpp:220
Stereo camera calibration data to be given to trackers.
Definition: t_tracking.h:111
Essential calibration data wrapped for C++.
Definition: t_calibration_opencv.hpp:30
Image size.
Definition: xrt_defines.h:216
#define XRT_DISTORTION_MAX_DIM
Maximum size of rectilinear distortion coefficient array.
Definition: t_tracking.h:83
double camera_fundamental[3][3]
Fundamental matrix.
Definition: t_tracking.h:127
double intrinsics[3][3]
Camera intrinsics matrix.
Definition: t_tracking.h:95
bool use_fisheye
Is the camera fisheye?
Definition: t_tracking.h:105
Rectification, rotation, projection data for a single view in a stereo pair.
Definition: t_calibration_opencv.hpp:184
double camera_essential[3][3]
Essential matrix.
Definition: t_tracking.h:125
An x,y pair of matrices for the remap() function.
Definition: t_calibration_opencv.hpp:156
struct xrt_size image_size_pixels
Source image size.
Definition: t_tracking.h:92
bool isDataStorageValid() const noexcept
Try to verify nothing was reallocated.
Definition: t_calibration_opencv.hpp:54