From 42d08fd820335584365d393da3967853676a8c35 Mon Sep 17 00:00:00 2001 From: Aymeric DUJARDIN Date: Wed, 24 Apr 2019 15:18:41 +0200 Subject: [PATCH] Fix cv exception when using both TRACK_OPTFLOW and ZED_STEREO --- src/yolo_console_dll.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/yolo_console_dll.cpp b/src/yolo_console_dll.cpp index 4f2b2b74..60da53f6 100644 --- a/src/yolo_console_dll.cpp +++ b/src/yolo_console_dll.cpp @@ -129,7 +129,9 @@ cv::Mat slMat2cvMat(sl::Mat &input) { cv::Mat zed_capture_rgb(sl::Camera &zed) { sl::Mat left; zed.retrieveImage(left); - return slMat2cvMat(left).clone(); + cv::Mat left_rgb; + cv::cvtColor(slMat2cvMat(left), left_rgb, CV_RGBA2RGB); + return left_rgb; } cv::Mat zed_capture_3d(sl::Camera &zed) {