From 53117c5ac79ec399415c5132dd65d4ed0fd7bce3 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 23 Sep 2017 19:20:11 +0200 Subject: tracker/pt: fix braino Don't multiply red channel by 3 in 0->1 range. --- tracker-pt/point_extractor.cpp | 10 +++------- 1 file 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 + * Copyright (c) 2015-2017 Stanislaw Halik * * 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; } -- cgit v1.2.3