From 2de1c44a994fb72142ef020546efcd22ac8c6a83 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 12 Oct 2014 16:10:23 +0200 Subject: aruco cleanup, experimental contrast fix --- ftnoir_tracker_aruco/ar_video_widget.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ftnoir_tracker_aruco/ar_video_widget.cpp') diff --git a/ftnoir_tracker_aruco/ar_video_widget.cpp b/ftnoir_tracker_aruco/ar_video_widget.cpp index 9a089213..61a611ea 100644 --- a/ftnoir_tracker_aruco/ar_video_widget.cpp +++ b/ftnoir_tracker_aruco/ar_video_widget.cpp @@ -40,3 +40,15 @@ void ArucoVideoWidget::update_and_repaint() texture = qframe2; update(); } + +void ArucoVideoWidget::paintEvent(QPaintEvent* e) +{ + QMutexLocker foo(&mtx); + QPainter(this).drawImage(e->rect(), texture); +} + +ArucoVideoWidget::ArucoVideoWidget(QWidget* parent): QWidget(parent) +{ + connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint())); + timer.start(60); +} \ No newline at end of file -- cgit v1.2.3