From dad70ab7d08e4a3889feb3b8a223563837be5ad8 Mon Sep 17 00:00:00 2001 From: Mateo de Mayo Date: Mon, 23 May 2022 11:04:42 -0300 Subject: [PATCH] external/slam: Improve cam_calibration feature struct --- src/external/slam_tracker/slam_tracker.hpp | 27 +++++++++++++--------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/src/external/slam_tracker/slam_tracker.hpp b/src/external/slam_tracker/slam_tracker.hpp index 71e4eb847..0274c6525 100644 --- a/src/external/slam_tracker/slam_tracker.hpp +++ b/src/external/slam_tracker/slam_tracker.hpp @@ -27,7 +27,7 @@ namespace xrt::auxiliary::tracking::slam { // For implementation: same as IMPLEMENTATION_VERSION_* // For user: expected IMPLEMENTATION_VERSION_*. Should be checked in runtime. -constexpr int HEADER_VERSION_MAJOR = 2; //!< API Breakages +constexpr int HEADER_VERSION_MAJOR = 3; //!< API Breakages constexpr int HEADER_VERSION_MINOR = 0; //!< Backwards compatible API changes constexpr int HEADER_VERSION_PATCH = 0; //!< Backw. comp. .h-implemented changes @@ -185,17 +185,22 @@ private: constexpr int FID_##SHORT_NAME = ID; \ constexpr int F_##NAME = ID; +/*! + * Container of parameters for a pinhole camera calibration (fx, fy, cx, cy) + * with an optional distortion. + * + *`distortion_model` and its corresponding `distortion` parameters are not + * standardized in this struct to facilitate implementation prototyping. + */ struct cam_calibration { - enum class cam_model { pinhole, fisheye }; - int cam_index; //!< For multi-camera setups. For stereo 0 ~ left, 1 ~ right. - int width, height; // model_params; - cv::Matx T_cam_imu; //!< Transformation from camera to imu space + int width, height; // distortion; //!< Parameters for the distortion_model + cv::Matx t_imu_cam; //!< Transformation from IMU to camera }; struct inertial_calibration { @@ -204,7 +209,7 @@ struct inertial_calibration { //! This transform will be applied to raw measurements. cv::Matx transform; - //! Offset to apply to raw measurements to; called bias in other contexts. + //! Offset to add to raw measurements to; called bias in other contexts. cv::Matx offset; // Parameters for the random processes that model this IMU. See section "2.1