From 19dcf6de27cbb4347f940186370823f479ab1a5c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 11 Jan 2014 18:08:15 +0100 Subject: get rid of frame copy throttling --- FTNoIR_Tracker_PT/pt_video_widget.cpp | 11 ++--------- FTNoIR_Tracker_PT/pt_video_widget.h | 2 -- 2 files changed, 2 insertions(+), 11 deletions(-) (limited to 'FTNoIR_Tracker_PT') 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 #include #include -#include class PTVideoWidget : public QWidget, public FrameObserver { @@ -53,7 +52,6 @@ private: QImage texture; QTimer timer; cv::Mat _frame; - QElapsedTimer update_throttler; bool freshp; }; -- cgit v1.2.3