summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/ftnoir_tracker_pt.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-12-08 05:34:59 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-12-08 05:35:04 +0100
commitbe051e0b0d1207c2cc1932e647ddfeeb16b0b3fe (patch)
tree02a5e7c8fcb7b3c7a2cac88ab6057e8fe32e90d0 /tracker-pt/ftnoir_tracker_pt.cpp
parent57d8fa7661c97fb9f02279060694a0073e7cc8b5 (diff)
tracker/pt: fix camera Hz always the default value
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.cpp')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 0e43b812..40293f56 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -181,22 +181,12 @@ void Tracker_PT::apply_settings()
QMutexLocker l(&camera_mtx);
- CamInfo info = camera.get_desired();
- const QString name = camera.get_desired_name();
+ CamInfo info;
- if (s.cam_fps != info.fps ||
- s.cam_res_x != info.res_x ||
- s.cam_res_y != info.res_y ||
- s.camera_name != name)
- {
- qDebug() << "pt: starting camera";
- camera.stop();
- camera.set_device(s.camera_name);
- camera.set_res(s.cam_res_x, s.cam_res_y);
- camera.set_fps(s.cam_fps);
+ if (!camera.get_info(info) || frame.rows != info.res_y || frame.cols != info.res_x)
frame = cv::Mat();
- camera.start();
- }
+
+ camera.start(camera_name_to_index(s.camera_name), s.cam_fps, s.cam_res_x, s.cam_res_y);
qDebug() << "pt: done applying settings";
}