diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-12 19:40:22 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-12 19:40:22 +0100 |
commit | 537a88e522314753149e1ea7921489e58043b40c (patch) | |
tree | a62ac59a546c8b0ee8adeee3bd2aa255d7e4570e /cv/video-widget.hpp | |
parent | 11d8e48e4370c9201f8258b418aadc7a4290dba1 (diff) |
tracker/pt: isolate point extractor and image type
Issue: #718
Diffstat (limited to 'cv/video-widget.hpp')
-rw-r--r-- | cv/video-widget.hpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cv/video-widget.hpp b/cv/video-widget.hpp index 5dd70815..7faddb49 100644 --- a/cv/video-widget.hpp +++ b/cv/video-widget.hpp @@ -9,6 +9,7 @@ #pragma once #include <memory> +#include <vector> #include <opencv2/core.hpp> @@ -25,17 +26,21 @@ class cv_video_widget final : public QWidget { Q_OBJECT + public: cv_video_widget(QWidget *parent); - void update_image(const cv::Mat &frame); + void update_image(const cv::Mat& frame); + void update_image(const QImage& image); + + static constexpr inline int width = 320, height = 240; protected slots: void paintEvent(QPaintEvent*) override; void update_and_repaint(); private: - QMutex mtx; + QMutex mtx { QMutex::Recursive }; QImage texture; + std::vector<unsigned char> vec; QTimer timer; - QSize preview_size; cv::Mat _frame, _frame2, _frame3; - bool freshp; + bool freshp = false; }; |