diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-11-07 17:21:27 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-11-07 17:21:27 +0100 |
commit | ee82f14d1f2bbdc8fd7c0898e0c47494e4e7362d (patch) | |
tree | 4abe16c8597cb4068fb4d3d3019c743ab5fa1e06 /ftnoir_tracker_aruco/ar_video_widget.h | |
parent | 167e1517c64974ca0a7de6ea07de53df57e2b4b7 (diff) |
fix flicker, hopefully fix pitch
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'ftnoir_tracker_aruco/ar_video_widget.h')
-rw-r--r-- | ftnoir_tracker_aruco/ar_video_widget.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ftnoir_tracker_aruco/ar_video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h index e1c7cff8..b95d1873 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.h +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -16,6 +16,7 @@ #include <QPainter> #include <QPaintEvent> #include <QTimer> +#include <opencv/cv.hpp> // ---------------------------------------------------------------------------- class ArucoVideoWidget : public QWidget @@ -23,11 +24,11 @@ class ArucoVideoWidget : public QWidget Q_OBJECT public: - ArucoVideoWidget(QWidget *parent) : QWidget(parent), fb(), width(0), height(0) { + ArucoVideoWidget(QWidget *parent) : QWidget(parent) { connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); timer.start(60); } - void update_image(unsigned char* frame, int width, int height); + void update_image(const cv::Mat& frame); protected slots: void paintEvent( QPaintEvent* e ) { QMutexLocker foo(&mtx); @@ -40,8 +41,7 @@ private: QMutex mtx; QPixmap pixmap; QTimer timer; - char fb[2048*2048*3]; - int width,height; + cv::Mat _frame; }; #endif // VIDEOWIDGET_H |