summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/module/point_extractor.h
diff options
context:
space:
mode:
authorAndy Sloane <andy@a1k0n.net>2020-06-04 18:48:51 -0700
committerAndy Sloane <andy@a1k0n.net>2020-06-05 07:29:25 -0700
commitc3148df41d2c540acc0a6f72aa0f2088147848ee (patch)
treef10e2aeccd65e29860823ad3d58d045db5aab6a6 /tracker-pt/module/point_extractor.h
parent8b14345cf6e06a2938dc7cd8de5e8ca2ec2df039 (diff)
Add proper color keying to tracker-pt
Instead of just selecting the red/green/blue channels, also subtract the other channels. This allows for point tracking with just colored spots, rather than IR LEDs -- green and magenta work particularly well for this. This keeps the existing "Red/Green/Blue only" options, but adds "Red/Green/Blue/Cyan/Yellow/Magenta filter" options, which do a better job of isolating those colors.
Diffstat (limited to 'tracker-pt/module/point_extractor.h')
-rw-r--r--tracker-pt/module/point_extractor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tracker-pt/module/point_extractor.h b/tracker-pt/module/point_extractor.h
index a6103667..9c97b6ce 100644
--- a/tracker-pt/module/point_extractor.h
+++ b/tracker-pt/module/point_extractor.h
@@ -49,6 +49,7 @@ private:
void ensure_buffers(const cv::Mat& frame);
void extract_single_channel(const cv::Mat& orig_frame, int idx, cv::Mat1b& dest);
+ void filter_single_channel(const cv::Mat& orig_frame, float r, float g, float b, cv::Mat1b& dest);
void color_to_grayscale(const cv::Mat& frame, cv::Mat1b& output);
void threshold_image(const cv::Mat& frame_gray, cv::Mat1b& output);