summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorAndy Sloane <andy@a1k0n.net>2020-06-05 08:13:24 -0700
committerAndy Sloane <andy@a1k0n.net>2020-06-05 08:13:24 -0700
commit9d9f42c35044bd4cbd40eea1b670b7a5114b7344 (patch)
tree919b3a267fec68d470aed40afd3e96d7dc96ca4e /tracker-pt
parentc3148df41d2c540acc0a6f72aa0f2088147848ee (diff)
fix some RGB/BGR confusion
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/module/point_extractor.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tracker-pt/module/point_extractor.cpp b/tracker-pt/module/point_extractor.cpp
index 766a9364..8fea1742 100644
--- a/tracker-pt/module/point_extractor.cpp
+++ b/tracker-pt/module/point_extractor.cpp
@@ -119,7 +119,7 @@ void PointExtractor::filter_single_channel(const cv::Mat& orig_frame, float r, f
{
ensure_channel_buffers(orig_frame);
- cv::transform(orig_frame, dest, cv::Mat(cv::Matx13f(r, g, b)));
+ cv::transform(orig_frame, dest, cv::Mat(cv::Matx13f(b, g, r)));
}
void PointExtractor::color_to_grayscale(const cv::Mat& frame, cv::Mat1b& output)
@@ -143,7 +143,7 @@ void PointExtractor::color_to_grayscale(const cv::Mat& frame, cv::Mat1b& output)
}
case pt_color_red_filter:
{
- filter_single_channel(frame, -0.5, -0.5, 1, output);
+ filter_single_channel(frame, 1, -0.5, -0.5, output);
break;
}
case pt_color_green_filter:
@@ -153,17 +153,17 @@ void PointExtractor::color_to_grayscale(const cv::Mat& frame, cv::Mat1b& output)
}
case pt_color_blue_filter:
{
- filter_single_channel(frame, 1, -0.5, -0.5, output);
+ filter_single_channel(frame, -0.5, -0.5, 1, output);
break;
}
case pt_color_cyan_filter:
{
- filter_single_channel(frame, 0.5, 0.5, -1, output);
+ filter_single_channel(frame, -1, 0.5, 0.5, output);
break;
}
case pt_color_yellow_filter:
{
- filter_single_channel(frame, -1, 0.5, 0.5, output);
+ filter_single_channel(frame, 0.5, 0.5, -1, output);
break;
}
case pt_color_magenta_filter: