summaryrefslogtreecommitdiffhomepage
path: root/tracker-aruco
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-aruco
parent204354a81b04bd9b4c0aa73ed36d50511acff541 (diff)
tracker/{pt,aruco}: simplify
Diffstat (limited to 'tracker-aruco')
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.cpp8
-rw-r--r--tracker-aruco/ftnoir_tracker_aruco.h5
2 files changed, 7 insertions, 6 deletions
diff --git a/tracker-aruco/ftnoir_tracker_aruco.cpp b/tracker-aruco/ftnoir_tracker_aruco.cpp
index 27d5e94b..962d0060 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.cpp
+++ b/tracker-aruco/ftnoir_tracker_aruco.cpp
@@ -76,11 +76,11 @@ aruco_tracker::~aruco_tracker()
void aruco_tracker::start_tracker(QFrame* videoframe)
{
videoframe->show();
- videoWidget = qptr<cv_video_widget>(videoframe);
- layout = qptr<QHBoxLayout>();
+ videoWidget = std::make_unique<cv_video_widget>(videoframe);
+ layout = std::make_unique<QHBoxLayout>();
layout->setContentsMargins(0, 0, 0, 0);
- layout->addWidget(videoWidget.data());
- videoframe->setLayout(layout.data());
+ layout->addWidget(videoWidget.get());
+ videoframe->setLayout(layout.get());
videoWidget->show();
start();
}
diff --git a/tracker-aruco/ftnoir_tracker_aruco.h b/tracker-aruco/ftnoir_tracker_aruco.h
index 4b3bde73..fd42d722 100644
--- a/tracker-aruco/ftnoir_tracker_aruco.h
+++ b/tracker-aruco/ftnoir_tracker_aruco.h
@@ -23,6 +23,7 @@
#include <QDialog>
#include <QTimer>
+#include <memory>
#include <cinttypes>
#include <opencv2/core.hpp>
@@ -97,8 +98,8 @@ private:
cv::VideoCapture camera;
QMutex camera_mtx;
QMutex mtx;
- qshared<cv_video_widget> videoWidget;
- qshared<QHBoxLayout> layout;
+ std::unique_ptr<cv_video_widget> videoWidget;
+ std::unique_ptr<QHBoxLayout> layout;
settings s;
double pose[6], fps, no_detection_timeout;
cv::Mat frame, grayscale, color;