From f9e0b3222f1ec64be72a9cb4c70e2e8e050b3293 Mon Sep 17 00:00:00 2001
From: Sebastian Hahta <joseha@utu.fi>
Date: Tue, 8 Oct 2019 10:02:03 +0300
Subject: [PATCH] fix: right camera parameters were not stored

---
 components/rgbd-sources/src/calibrate.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/rgbd-sources/src/calibrate.cpp b/components/rgbd-sources/src/calibrate.cpp
index 3940520d2..fc99d701f 100644
--- a/components/rgbd-sources/src/calibrate.cpp
+++ b/components/rgbd-sources/src/calibrate.cpp
@@ -199,7 +199,7 @@ void Calibrate::_updateIntrinsics() {
 	// Set correct camera matrices for
 	// getCameraMatrix(), getCameraMatrixLeft(), getCameraMatrixRight()
 	Kl_ = Mat(P1, cv::Rect(0, 0, 3, 3));
-	Kr_ = Mat(P1, cv::Rect(0, 0, 3, 3));
+	Kr_ = Mat(P2, cv::Rect(0, 0, 3, 3));
 
 	initUndistortRectifyMap(K1_, D1_, R1, P1, img_size_, CV_32FC1, map1_.first, map2_.first);
 	initUndistortRectifyMap(K2_, D2_, R2, P2, img_size_, CV_32FC1, map1_.second, map2_.second);
-- 
GitLab