diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-01-04 13:41:46 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-01-04 13:41:46 +0100 |
commit | 8b845f242495a91aca45cd1bf59d1823517b32c8 (patch) | |
tree | b7c1cee3ed3944c6affc31c2fd1df431f2ae8c28 /FTNoIR_Tracker_PT/pt_video_widget.h | |
parent | 66466d0c30e7a2aed1a0c6c45db4b86dd5f0a99e (diff) |
disable hysteresis debug; throttle frame update rate
Diffstat (limited to 'FTNoIR_Tracker_PT/pt_video_widget.h')
-rw-r--r-- | FTNoIR_Tracker_PT/pt_video_widget.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/FTNoIR_Tracker_PT/pt_video_widget.h b/FTNoIR_Tracker_PT/pt_video_widget.h index acff43fb..c47198db 100644 --- a/FTNoIR_Tracker_PT/pt_video_widget.h +++ b/FTNoIR_Tracker_PT/pt_video_widget.h @@ -24,15 +24,20 @@ #include <QPainter>
#include <QPaintEvent>
#include <QTimer>
+#include <QElapsedTimer>
class PTVideoWidget : public QWidget, public FrameObserver
{
Q_OBJECT
public:
- PTVideoWidget(QWidget *parent, FrameProvider* provider) : QWidget(parent), /* to avoid linker errors */ FrameObserver(provider) {
+ PTVideoWidget(QWidget *parent, FrameProvider* provider) :
+ QWidget(parent),
+ /* to avoid linker errors */ FrameObserver(provider),
+ freshp(false)
+ {
connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint()));
- timer.start(45);
+ timer.start(40);
}
void update_image(const cv::Mat &frame);
void update_frame_and_points() {}
@@ -48,6 +53,8 @@ private: QImage texture;
QTimer timer;
cv::Mat _frame;
+ QElapsedTimer update_throttler;
+ bool freshp;
};
// ----------------------------------------------------------------------------
|