Skip to content

Commit

Permalink
tracker/pt: don't use grayscale with color key selected
Browse files Browse the repository at this point in the history
  • Loading branch information
sthalik committed Sep 4, 2021
1 parent 14af67c commit cf2a406
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tracker-pt/module/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cf2a406

Please sign in to comment.