summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-09-04 19:14:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2021-09-04 19:14:02 +0200
commitcf2a406a8a2a46b0ea5494959c0e454496c49bc6 (patch)
tree9201ce3c7dabe4e7b7433167c654d35856416a7f
parent14af67c5a1a07744025cd7ff48ef29bc9f6c3daa (diff)
tracker/pt: don't use grayscale with color key selectedopentrack-2021.1.2
-rw-r--r--tracker-pt/module/camera.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tracker-pt/module/camera.cpp b/tracker-pt/module/camera.cpp
index 5c15dba8..19c0c222 100644
--- a/tracker-pt/module/camera.cpp
+++ b/tracker-pt/module/camera.cpp
@@ -107,7 +107,14 @@ bool Camera::start(const pt_settings& s)
info.width = res_x;
info.height = res_y;
info.use_mjpeg = use_mjpeg;
- info.num_channels = 1;
+ switch (*s.blob_color)
+ {
+ case pt_color_natural:
+ case pt_color_average:
+ info.num_channels = 1; break;
+ default:
+ info.num_channels = 3; break;
+ }
if (!cap->start(info))
goto fail;