From dc07e5c4ab70449354062e7cc1bf4630b8ec6ddc Mon Sep 17 00:00:00 2001 From: itgo067 Date: Wed, 19 Oct 2022 12:08:36 +0800 Subject: [PATCH] fixed read 'stereo:ty' and 'stereo:tz' doesn't need resolution_str --- cpp/include/calibration.hpp | 4 ++-- python/zed_opencv_native.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/include/calibration.hpp b/cpp/include/calibration.hpp index b821045..5775314 100644 --- a/cpp/include/calibration.hpp +++ b/cpp/include/calibration.hpp @@ -4206,8 +4206,8 @@ bool initCalibration(std::string calibration_file, cv::Size2i image_size, cv::Ma // Get translations float T_[3]; T_[0] = camerareader.getValue("stereo:baseline", 0.0f); - T_[1] = camerareader.getValue("stereo:ty_" + resolution_str, 0.f); - T_[2] = camerareader.getValue("stereo:tz_" + resolution_str, 0.f); + T_[1] = camerareader.getValue("stereo:ty", 0.f); + T_[2] = camerareader.getValue("stereo:tz", 0.f); // Get left parameters float left_cam_cx = camerareader.getValue("left_cam_" + resolution_str + ":cx", 0.0f); diff --git a/python/zed_opencv_native.py b/python/zed_opencv_native.py index 4131445..347dd76 100644 --- a/python/zed_opencv_native.py +++ b/python/zed_opencv_native.py @@ -71,8 +71,8 @@ def init_calibration(calibration_file, image_size) : check_data = False T_ = np.array([-float(config['STEREO']['Baseline'] if 'Baseline' in config['STEREO'] else 0), - float(config['STEREO']['TY_'+resolution_str] if 'TY_'+resolution_str in config['STEREO'] else 0), - float(config['STEREO']['TZ_'+resolution_str] if 'TZ_'+resolution_str in config['STEREO'] else 0)]) + float(config['STEREO']['TY'] if 'TY' in config['STEREO'] else 0), + float(config['STEREO']['TZ'] if 'TZ' in config['STEREO'] else 0)]) left_cam_cx = float(config['LEFT_CAM_'+resolution_str]['cx'] if 'cx' in config['LEFT_CAM_'+resolution_str] else 0)