summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/module
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-10-12 18:56:26 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-10-12 17:08:59 +0000
commitc57b524d3038dd1d94379038d362dea5b2896c60 (patch)
treee6946995a856f91d6e0f069fa8aa0a88e38d164d /tracker-pt/module
parent95d18c6a04b83943b0c3d095fedb681a2a0a2c0b (diff)
logic/pipeline: cleanup only
Diffstat (limited to 'tracker-pt/module')
-rw-r--r--tracker-pt/module/camera.cpp11
1 files changed, 5 insertions, 6 deletions
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;