summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_tracker_pt/ftnoir_tracker_pt.cpp')
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
index be946018..013777bc 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
@@ -72,6 +72,8 @@ void Tracker_PT::run()
if (!log_file.open(QIODevice::WriteOnly | QIODevice::Text)) return;
QTextStream log_stream(&log_file);
#endif
+
+ apply_settings();
while((commands & ABORT) == 0)
{
@@ -152,9 +154,11 @@ void Tracker_PT::apply_settings()
{
qDebug()<<"Tracker:: Applying settings";
QMutexLocker l(&camera_mtx);
+ camera.stop();
camera.set_device_index(camera_name_to_index(s.camera_name));
camera.set_res(s.cam_res_x, s.cam_res_y);
camera.set_fps(s.cam_fps);
+ camera.start();
cv::Mat intrinsics_ = cv::Mat::eye(3, 3, CV_32FC1);
cv::Mat dist_coeffs_ = cv::Mat::zeros(5, 1, CV_32FC1);
intrinsics = cv::Mat();
@@ -183,8 +187,6 @@ void Tracker_PT::start_tracker(QFrame *parent_window)
video_layout->addWidget(video_widget);
video_frame->setLayout(video_layout);
video_widget->resize(video_frame->width(), video_frame->height());
- camera.start();
- apply_settings();
start();
}