From 0c16fdd14d4e267fb22e3e38c556c1f077ff4440 Mon Sep 17 00:00:00 2001 From: Sebastian Hahta <joseha@utu.fi> Date: Fri, 24 Jul 2020 12:42:20 +0300 Subject: [PATCH] correct rectification parameter calculation --- .../rgbd-sources/src/sources/stereovideo/rectification.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/rgbd-sources/src/sources/stereovideo/rectification.cpp b/components/rgbd-sources/src/sources/stereovideo/rectification.cpp index b9f0b1a36..a9395664c 100644 --- a/components/rgbd-sources/src/sources/stereovideo/rectification.cpp +++ b/components/rgbd-sources/src/sources/stereovideo/rectification.cpp @@ -91,9 +91,9 @@ void StereoRectification::calculateParameters() { // calculate rotation and translation from left to right using calibration cv::Mat T_l = calib_left_.extrinsic.matrix(); cv::Mat T_r = calib_right_.extrinsic.matrix(); - cv::Mat T = T_r * T_l; - cv::Mat R; - cv::Mat t; + cv::Mat T = T_l * transform::inverse(T_r); + cv::Mat R, t; + transform::getRotationAndTranslation(T, R, t); baseline_ = cv::norm(t); -- GitLab