summaryrefslogtreecommitdiffhomepage
path: root/tracker-neuralnet/ftnoir_tracker_neuralnet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-neuralnet/ftnoir_tracker_neuralnet.cpp')
-rw-r--r--tracker-neuralnet/ftnoir_tracker_neuralnet.cpp3
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);