diff options
-rw-r--r-- | tracker-aruco/ftnoir_tracker_aruco.cpp | 8 | ||||
-rw-r--r-- | tracker-aruco/ftnoir_tracker_aruco.h | 5 | ||||
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.cpp | 8 | ||||
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.h | 13 |
4 files changed, 17 insertions, 17 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; 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; |