summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xtracker-pt/ftnoir_tracker_pt.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 1e76af04..87e9b2b8 100755
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -229,11 +229,18 @@ void Tracker_PT::apply_settings()
break;
}
- camera.set_res(res_x, res_y);
- camera.set_fps(cam_fps);
- qDebug() << "camera start";
- camera.start();
- frame = cv::Mat();
+ const CamInfo cur = camera.get_desired();
+
+ if (cur.fps != cam_fps ||
+ cur.res_x != res_x ||
+ cur.res_y != res_y)
+ {
+ camera.set_res(res_x, res_y);
+ camera.set_fps(cam_fps);
+ qDebug() << "camera start";
+ camera.start();
+ frame = cv::Mat();
+ }
qDebug()<<"Tracker::apply ends";
}