summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-09-23 19:20:11 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-09-23 19:20:11 +0200
commit53117c5ac79ec399415c5132dd65d4ed0fd7bce3 (patch)
tree42fd053e80df33ddf183c8e8deb9b785353843b8
parentddfbef12b81926be3f2eecf31222ad6eaca6a29a (diff)
tracker/pt: fix braino
Don't multiply red channel by 3 in 0->1 range.
-rw-r--r--tracker-pt/point_extractor.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/tracker-pt/point_extractor.cpp b/tracker-pt/point_extractor.cpp
index 54514111..7ffbed7a 100644
--- a/tracker-pt/point_extractor.cpp
+++ b/tracker-pt/point_extractor.cpp
@@ -1,5 +1,5 @@
/* Copyright (c) 2012 Patrick Ruoff
- * Copyright (c) 2015-2016 Stanislaw Halik <sthalik@misaki.pl>
+ * Copyright (c) 2015-2017 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -148,16 +148,12 @@ void PointExtractor::extract_points(const cv::Mat& frame, cv::Mat& preview_frame
case pt_color_red_only:
{
static constexpr int from_to[] = {
- 2, 0
+ 2, 0 // red
};
separate_channels(frame, from_to, 1);
- static constexpr float R = 3;
-
- ch_float[1] = ch_float[0] * R; // red
-
- ch_float[1].convertTo(frame_gray, CV_8U);
+ ch_float[0].convertTo(frame_gray, CV_8U);
break;
}