From 60201f181eed06fed6112530c3283453a5e45688 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 27 Sep 2021 15:36:39 +0200 Subject: tracker/pt: fix accidentally converting preview to grayscale --- tracker-pt/module/frame.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tracker-pt/module/frame.cpp b/tracker-pt/module/frame.cpp index dc122375..be966424 100644 --- a/tracker-pt/module/frame.cpp +++ b/tracker-pt/module/frame.cpp @@ -27,9 +27,9 @@ void Preview::set_last_frame(const pt_frame& frame_) frame_copy.setTo(cv::Scalar{0, 0, 0}); } - const bool need_resize = frame2.cols != frame_out.cols || frame2.rows != frame_out.rows; + const bool need_resize = frame->cols != frame_out.cols || frame->rows != frame_out.rows; if (need_resize) - cv::resize(frame2, frame_copy, cv::Size(frame_out.cols, frame_out.rows), 0, 0, cv::INTER_NEAREST); + cv::resize(*frame, frame_copy, cv::Size(frame_out.cols, frame_out.rows), 0, 0, cv::INTER_NEAREST); else frame->copyTo(frame_copy); } -- cgit v1.2.3