From c3148df41d2c540acc0a6f72aa0f2088147848ee Mon Sep 17 00:00:00 2001 From: Andy Sloane Date: Thu, 4 Jun 2020 18:48:51 -0700 Subject: 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. --- tracker-pt/module/point_extractor.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tracker-pt/module/point_extractor.h') 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); -- cgit v1.2.3