From f531c3164271f69cb2caef0334b2e24fdd3f1efc Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 5 Jan 2022 21:05:30 +0100 Subject: tracker/pt: clean up grayscale handling. add migration. The averaging mode is slower than the opencv SIMD implementation for BT.709. Remove it. Make it optional to perform hardware grayscaling using the ps3eye sensor with the open driver. Default to grayscaling using the CPU. --- tracker-pt/module/camera.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'tracker-pt/module/camera.cpp') diff --git a/tracker-pt/module/camera.cpp b/tracker-pt/module/camera.cpp index 73c57f37..1beba474 100644 --- a/tracker-pt/module/camera.cpp +++ b/tracker-pt/module/camera.cpp @@ -104,14 +104,7 @@ bool Camera::start(const pt_settings& s) info.width = res_x; info.height = res_y; info.use_mjpeg = use_mjpeg; - switch (*s.blob_color) - { - case pt_color_natural: - case pt_color_average: - info.num_channels = 1; break; - default: - info.num_channels = 3; break; - } + info.num_channels = s.blob_color == pt_color_hardware ? 1 : 3; if (!cap->start(info)) goto fail; -- cgit v1.2.3