diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-08-03 06:15:48 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-08-03 06:15:48 +0200 |
commit | 28b4f283f20d0ecf370ac33ed25501e1c2b927a9 (patch) | |
tree | f3d7c396e3588a253b0a88e34b7d56d47d835389 | |
parent | bad2a3e97a92b32c163510e7a0764034c1f87d80 (diff) |
tracker/pt: extract green channel only as user option
Issue: #808
Requested-by: @DanTDBV
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt_dialog.cpp | 1 | ||||
-rw-r--r-- | tracker-pt/module/point_extractor.cpp | 5 | ||||
-rw-r--r-- | tracker-pt/pt-settings.hpp | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp index 01ae83c9..1f6233f1 100644 --- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp +++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp @@ -94,6 +94,7 @@ TrackerDialog_PT::TrackerDialog_PT(const QString& module_name) : pt_color_average, pt_color_natural, pt_color_red_only, + pt_color_green_only, pt_color_blue_only, }; diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp index 00248029..cd6cea7c 100644 --- a/tracker-pt/module/point_extractor.cpp +++ b/tracker-pt/module/point_extractor.cpp @@ -128,6 +128,11 @@ void PointExtractor::color_to_grayscale(const cv::Mat& frame, cv::Mat1b& output) { switch (s.blob_color) { + case pt_color_green_only: + { + extract_single_channel(frame, 1, output); + break; + } case pt_color_blue_only: { extract_single_channel(frame, 0, output); diff --git a/tracker-pt/pt-settings.hpp b/tracker-pt/pt-settings.hpp index 62297713..9c4b6438 100644 --- a/tracker-pt/pt-settings.hpp +++ b/tracker-pt/pt-settings.hpp @@ -12,6 +12,7 @@ enum pt_color_type pt_color_red_only = 3, pt_color_average = 5, pt_color_blue_only = 6, + pt_color_green_only = 7, }; namespace pt_settings_detail { |