diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-27 15:36:17 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-27 16:05:03 +0200 |
commit | bbf1d98e96126e361272b44aca15e7ef576700de (patch) | |
tree | 11fe17b9a387f699dd971a7b365461dff03b08c3 | |
parent | 018cbba02e06635f4fafb5b9a8c8585a3a634b55 (diff) |
tracker/pt: fix inverted width, height arguments
-rw-r--r-- | tracker-pt/module/frame.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tracker-pt/module/frame.cpp b/tracker-pt/module/frame.cpp index faab4efb..dc122375 100644 --- a/tracker-pt/module/frame.cpp +++ b/tracker-pt/module/frame.cpp @@ -23,8 +23,8 @@ void Preview::set_last_frame(const pt_frame& frame_) if (frame->channels() != 3) { eval_once(qDebug() << "tracker/pt: camera frame depth: 3 !=" << frame->channels()); - frame_copy.create(cv::Size{frame_out.cols, frame_out.rows}, CV_8UC3); - frame_copy.setTo({0}); + frame_copy.create(cv::Size{frame_out.rows, frame_out.cols}, CV_8UC3); + frame_copy.setTo(cv::Scalar{0, 0, 0}); } const bool need_resize = frame2.cols != frame_out.cols || frame2.rows != frame_out.rows; @@ -36,8 +36,8 @@ void Preview::set_last_frame(const pt_frame& frame_) Preview::Preview(int w, int h) { - frame_out.create(w, h, CV_8UC4); - frame_copy.create(w, h, CV_8UC3); + frame_out.create(h, w, CV_8UC4); + frame_copy.create(h, w, CV_8UC3); frame_copy.setTo({0}); } |