From 6f90bda7374a2f69c8959b6896c43e79d668273f Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Thu, 30 Jul 2020 16:22:20 +0300
Subject: [PATCH] Copy when no rectify

---
 .../rgbd-sources/src/sources/stereovideo/rectification.cpp   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/components/rgbd-sources/src/sources/stereovideo/rectification.cpp b/components/rgbd-sources/src/sources/stereovideo/rectification.cpp
index 5d24a94ec..edf221d6d 100644
--- a/components/rgbd-sources/src/sources/stereovideo/rectification.cpp
+++ b/components/rgbd-sources/src/sources/stereovideo/rectification.cpp
@@ -112,7 +112,10 @@ void StereoRectification::calculateParameters() {
 
 void StereoRectification::rectify(cv::InputArray im, cv::OutputArray im_out, Channel c) {
 
-	if (!enabled_ || !valid_) { return; }
+	if (!enabled_ || !valid_) {
+		im.copyTo(im_out);
+		return;
+	}
 
 	if (im.size() != image_resolution_) {
 		throw ftl::exception("Input has wrong size");
-- 
GitLab