summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-08-19 12:11:11 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-08-19 12:11:11 +0200
commitc1d890fcf3056cd0e45a83130055456d492d723a (patch)
tree24db9e6d42d352f645b4b69c99a48b551cabd3d1 /tracker-pt
parent204354a81b04bd9b4c0aa73ed36d50511acff541 (diff)
tracker/{pt,aruco}: simplify
Diffstat (limited to 'tracker-pt')
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp8
-rw-r--r--tracker-pt/ftnoir_tracker_pt.h13
2 files changed, 10 insertions, 11 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 83ea094c..66d6f1ec 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -162,11 +162,11 @@ void Tracker_PT::start_tracker(QFrame* video_frame)
preview_frame = cv::Mat(video_frame->height(), video_frame->width(), CV_8UC3);
preview_frame.setTo(cv::Scalar(0, 0, 0));
- video_widget = qptr<cv_video_widget>(video_frame);
- layout = qptr<QHBoxLayout>(video_frame);
+ video_widget = std::make_unique<cv_video_widget>(video_frame);
+ layout = std::make_unique<QHBoxLayout>(video_frame);
layout->setContentsMargins(0, 0, 0, 0);
- layout->addWidget(video_widget.data());
- video_frame->setLayout(layout.data());
+ layout->addWidget(video_widget.get());
+ video_frame->setLayout(layout.get());
//video_widget->resize(video_frame->width(), video_frame->height());
video_frame->show();
diff --git a/tracker-pt/ftnoir_tracker_pt.h b/tracker-pt/ftnoir_tracker_pt.h
index 4110c9d9..6c2923c0 100644
--- a/tracker-pt/ftnoir_tracker_pt.h
+++ b/tracker-pt/ftnoir_tracker_pt.h
@@ -11,8 +11,6 @@
#include "api/plugin-api.hpp"
#include "ftnoir_tracker_pt_settings.h"
-#include <atomic>
-
#include "cv/numeric.hpp"
#include "camera.h"
@@ -21,6 +19,10 @@
#include "cv/video-widget.hpp"
#include "compat/util.hpp"
+#include <atomic>
+#include <memory>
+#include <vector>
+
#include <QCoreApplication>
#include <QThread>
#include <QMutex>
@@ -28,9 +30,6 @@
#include <QTime>
#include <QLayout>
#include <QSize>
-#include <atomic>
-#include <memory>
-#include <vector>
class TrackerDialog_PT;
@@ -72,8 +71,8 @@ private:
PointExtractor point_extractor;
PointTracker point_tracker;
- qshared<cv_video_widget> video_widget;
- qshared<QLayout> layout;
+ std::unique_ptr<cv_video_widget> video_widget;
+ std::unique_ptr<QLayout> layout;
settings_pt s;
cv::Mat frame, preview_frame;