summaryrefslogtreecommitdiffhomepage
path: root/tracker-easy/point_extractor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-easy/point_extractor.cpp')
-rw-r--r--tracker-easy/point_extractor.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tracker-easy/point_extractor.cpp b/tracker-easy/point_extractor.cpp
index ecd72f70..06bb6c9a 100644
--- a/tracker-easy/point_extractor.cpp
+++ b/tracker-easy/point_extractor.cpp
@@ -242,7 +242,15 @@ void PointExtractor::extract_points(const cv::Mat& frame, cv::Mat& preview_frame
{
ensure_buffers(frame);
- color_to_grayscale(frame, frame_gray_unmasked);
+ if (frame.channels() != 1)
+ {
+ color_to_grayscale(frame, frame_gray_unmasked);
+ }
+ else
+ {
+ frame_gray_unmasked = frame;
+ }
+
#if defined PREVIEW
cv::imshow("capture", frame_gray);