From 752c01c486b35ab6d7b22c2ad2f13d41a8631ed8 Mon Sep 17 00:00:00 2001 From: Sebastian Hahta <joseha@utu.fi> Date: Mon, 20 Jan 2020 14:43:09 +0200 Subject: [PATCH] RPC: set_rectify --- applications/calibration-multi/src/main.cpp | 9 +++++++++ .../rgbd-sources/src/sources/stereovideo/stereovideo.cpp | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/applications/calibration-multi/src/main.cpp b/applications/calibration-multi/src/main.cpp index b8c62e758..7256c48fe 100644 --- a/applications/calibration-multi/src/main.cpp +++ b/applications/calibration-multi/src/main.cpp @@ -376,11 +376,20 @@ void runCameraCalibration( ftl::Configurable* root, cv::drawMarker( rgb[i], points[i][1], Scalar(42, 42, 255), cv::MARKER_TILTED_CROSS, 25, 2); } + + // index cv::putText(rgb[i], "Camera " + std::to_string(i), Point2i(10, 30), cv::FONT_HERSHEY_COMPLEX_SMALL, 1.0, Scalar(64, 64, 255), 1); + // resolution + cv::putText(rgb[i], + "[" + std::to_string(rgb[i].size().width) + "x" + std::to_string(rgb[i].size().height) + "]", + Point2i(rgb[i].size().width-150, 30), + cv::FONT_HERSHEY_COMPLEX_SMALL, 1.0, Scalar(64, 64, 255), 1); + + // remaining frames cv::putText(rgb[i], std::to_string(std::max(0, (int) (n_views - calib.getViewsCount(i)))), Point2i(10, rgb[i].rows-10), diff --git a/components/rgbd-sources/src/sources/stereovideo/stereovideo.cpp b/components/rgbd-sources/src/sources/stereovideo/stereovideo.cpp index 584796770..b5b2ae2db 100644 --- a/components/rgbd-sources/src/sources/stereovideo/stereovideo.cpp +++ b/components/rgbd-sources/src/sources/stereovideo/stereovideo.cpp @@ -165,7 +165,7 @@ void StereoVideoSource::init(const string &file) { return calib_->saveCalibration(fname); }); - host_->getNet()->bind("use_rectify", + host_->getNet()->bind("set_rectify", [this](bool enable){ bool retval = enable && calib_->setRectify(enable); updateParameters(); -- GitLab