From c57b524d3038dd1d94379038d362dea5b2896c60 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 12 Oct 2018 18:56:26 +0200 Subject: logic/pipeline: cleanup only --- tracker-pt/module/camera.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tracker-pt/module') diff --git a/tracker-pt/module/camera.cpp b/tracker-pt/module/camera.cpp index 816a2484..14b565b6 100644 --- a/tracker-pt/module/camera.cpp +++ b/tracker-pt/module/camera.cpp @@ -102,19 +102,18 @@ bool Camera::start(int idx, int fps, int res_x, int res_y) cam_desired.res_y = res_y; cam_desired.fov = fov; - cap = camera_ptr(new cv::VideoCapture(cam_desired.idx)); + cap = camera_ptr(new cv::VideoCapture(idx)); if (cam_desired.res_x) - cap->set(cv::CAP_PROP_FRAME_WIDTH, cam_desired.res_x); + cap->set(cv::CAP_PROP_FRAME_WIDTH, res_x); if (cam_desired.res_y) - cap->set(cv::CAP_PROP_FRAME_HEIGHT, cam_desired.res_y); - if (cam_desired.fps) - cap->set(cv::CAP_PROP_FPS, cam_desired.fps); + cap->set(cv::CAP_PROP_FRAME_HEIGHT, res_y); + if (fps > 0) + cap->set(cv::CAP_PROP_FPS, fps); if (cap->isOpened()) { cam_info = pt_camera_info(); - active_name = QString(); cam_info.idx = idx; dt_mean = 0; active_name = desired_name; -- cgit v1.2.3