diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-03 22:36:04 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2021-09-03 22:36:04 +0200 |
commit | 4478909bbf018e814591077dfb98eb9b785eeadf (patch) | |
tree | e4ad1ae74fd72374d97a94f61042391a3b4b4882 /tracker-neuralnet/ftnoir_tracker_neuralnet.cpp | |
parent | 418d07a1e5a5173ed340180dd1cbcb185ee5ddfb (diff) |
tracker/neuralnet: fix copying grayscale frameopentrack-2021.1.1
It crashes later though.
Diffstat (limited to 'tracker-neuralnet/ftnoir_tracker_neuralnet.cpp')
-rw-r--r-- | tracker-neuralnet/ftnoir_tracker_neuralnet.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp b/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp index 4a780fc1..8fd65bc9 100644 --- a/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp +++ b/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp @@ -700,7 +700,8 @@ void neuralnet_tracker::run() switch (img.channels) { case 1: - grayscale.setTo(color); + grayscale.create(img.height, img.width, CV_8UC1); + color.copyTo(grayscale); break; case 3: cv::cvtColor(color, grayscale, cv::COLOR_BGR2GRAY); |