summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Tracker_PT
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-01-11 18:08:15 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-01-11 18:08:15 +0100
commit19dcf6de27cbb4347f940186370823f479ab1a5c (patch)
tree9dba47b2f422c3fcb13c7b4f90b11b540eeeae3b /FTNoIR_Tracker_PT
parent7da7a26385c1d54762d6f2d11a7036d856bc5864 (diff)
get rid of frame copy throttling
Diffstat (limited to 'FTNoIR_Tracker_PT')
-rw-r--r--FTNoIR_Tracker_PT/pt_video_widget.cpp11
-rw-r--r--FTNoIR_Tracker_PT/pt_video_widget.h2
2 files changed, 2 insertions, 11 deletions
diff --git a/FTNoIR_Tracker_PT/pt_video_widget.cpp b/FTNoIR_Tracker_PT/pt_video_widget.cpp
index 75fa18a0..02817cbf 100644
--- a/FTNoIR_Tracker_PT/pt_video_widget.cpp
+++ b/FTNoIR_Tracker_PT/pt_video_widget.cpp
@@ -18,15 +18,8 @@ using namespace std;
void PTVideoWidget::update_image(const cv::Mat& frame)
{
QMutexLocker foo(&mtx);
- const int rate = 40;
- if (freshp)
- return;
- if (frame.empty() || !update_throttler.isValid() || update_throttler.elapsed() > rate)
- {
- _frame = frame.clone();
- update_throttler.restart();
- freshp = true;
- }
+ _frame = frame.clone();
+ freshp = true;
}
// ----------------------------------------------------------------------------
diff --git a/FTNoIR_Tracker_PT/pt_video_widget.h b/FTNoIR_Tracker_PT/pt_video_widget.h
index c47198db..25d593c3 100644
--- a/FTNoIR_Tracker_PT/pt_video_widget.h
+++ b/FTNoIR_Tracker_PT/pt_video_widget.h
@@ -24,7 +24,6 @@
#include <QPainter>
#include <QPaintEvent>
#include <QTimer>
-#include <QElapsedTimer>
class PTVideoWidget : public QWidget, public FrameObserver
{
@@ -53,7 +52,6 @@ private:
QImage texture;
QTimer timer;
cv::Mat _frame;
- QElapsedTimer update_throttler;
bool freshp;
};