diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-10-19 14:45:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-10-19 14:46:33 +0200 |
commit | a38e3f7c61004a0844fb6c300c0b77d39a683fa6 (patch) | |
tree | 54b3fd31821025e43319719bfc820bc92319fcbb /tracker-pt/ftnoir_tracker_pt.cpp | |
parent | 0a518ad7d0aa94df529af2c39c2b34457b6d1015 (diff) |
dinput, tracker/pt: reword comments and fix harmless warnings
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.cpp')
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index 231a56cd..20084c10 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -7,12 +7,12 @@ */ #include "ftnoir_tracker_pt.h" +#include "compat/camera-names.hpp" #include <QHBoxLayout> #include <cmath> #include <QDebug> #include <QFile> #include <QCoreApplication> -#include "compat/camera-names.hpp" #include <functional> //#define PT_PERF_LOG //log performance @@ -135,8 +135,8 @@ void Tracker_PT::run() auto fun = [&](const vec2& p, const cv::Scalar& color) { using std::round; - cv::Point p2(round(p[0] * frame_.cols + frame_.cols/2), - round(-p[1] * frame_.cols + frame_.rows/2)); + cv::Point p2(int(round(p[0] * frame_.cols + frame_.cols/2)), + int(round(-p[1] * frame_.cols + frame_.rows/2))); cv::line(frame_, cv::Point(p2.x - 20, p2.y), cv::Point(p2.x + 20, p2.y), @@ -171,12 +171,13 @@ void Tracker_PT::run() video_widget->update_image(frame_); } } - qDebug()<<"Tracker:: Thread stopping"; + qDebug() << "pt: Thread stopping"; } void Tracker_PT::apply_settings() { - qDebug() << "Tracker:: Applying settings"; + qDebug() << "pt: applying settings"; + QMutexLocker l(&camera_mtx); CamInfo info = camera.get_desired(); @@ -187,7 +188,7 @@ void Tracker_PT::apply_settings() s.cam_res_y != info.res_y || s.camera_name != name) { - qDebug() << "pt: camera reset needed"; + qDebug() << "pt: starting camera"; camera.stop(); camera.set_device(s.camera_name); camera.set_res(s.cam_res_x, s.cam_res_y); @@ -195,10 +196,8 @@ void Tracker_PT::apply_settings() frame = cv::Mat(); camera.start(); } - else - qDebug() << "pt: camera not needing reset"; - qDebug() << "Tracker::apply ends"; + qDebug() << "pt: done applying settings"; } void Tracker_PT::start_tracker(QFrame *parent_window) |