summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_filter_kalman
diff options
context:
space:
mode:
authorDonovan Baarda <abo@minkirri.apana.org.au>2014-10-15 14:07:20 +1100
committerDonovan Baarda <abo@minkirri.apana.org.au>2014-10-15 14:07:20 +1100
commitdbd04e283082ab869a22abf03c4c6280b03935bb (patch)
tree3951c6f91f76047e655f35e04db4eecd576c49df /ftnoir_filter_kalman
parentd880464fbe9180aefde94594330126e115066dc3 (diff)
parent051a2e4392bc75b246cc5cb897ae0bbb1f92042e (diff)
Merge branch 'unstable' of https://github.com/opentrack/opentrack into dev/kalman
Conflicts: ftnoir_filter_kalman/ftnoir_filter_kalman.h
Diffstat (limited to 'ftnoir_filter_kalman')
-rwxr-xr-x[-rw-r--r--]ftnoir_filter_kalman/ftnoir_filter_kalman.h27
-rw-r--r--ftnoir_filter_kalman/kalman.cpp10
2 files changed, 16 insertions, 21 deletions
diff --git a/ftnoir_filter_kalman/ftnoir_filter_kalman.h b/ftnoir_filter_kalman/ftnoir_filter_kalman.h
index 363b8cd4..558aebd6 100644..100755
--- a/ftnoir_filter_kalman/ftnoir_filter_kalman.h
+++ b/ftnoir_filter_kalman/ftnoir_filter_kalman.h
@@ -8,29 +8,24 @@
#ifndef INCLUDED_FTN_FILTER_H
#define INCLUDED_FTN_FILTER_H
-#undef FTNOIR_TRACKER_BASE_LIB
-#define FTNOIR_TRACKER_BASE_EXPORT Q_DECL_IMPORT
-
-#include "ftnoir_filter_base/ftnoir_filter_base.h"
#include "ui_ftnoir_kalman_filtercontrols.h"
-#include "facetracknoir/global-settings.h"
-#include <opencv2/opencv.hpp>
+#include "facetracknoir/plugin-api.hpp"
+#include <opencv2/core/core.hpp>
+#include <opencv2/video/video.hpp>
#include <vector>
#include <QString>
-#include <QIcon>
-#include <QWidget>
#include <QElapsedTimer>
-#include <QObject>
+#include <QWidget>
#include "facetracknoir/options.h"
using namespace options;
-class FTNOIR_FILTER_BASE_EXPORT FTNoIR_Filter : public IFilter
+class OPENTRACK_EXPORT FTNoIR_Filter : public IFilter
{
public:
FTNoIR_Filter();
- void reset() virt_override;
+ void reset();
void FilterHeadPoseData(const double *target_camera_position,
- double *new_camera_position) virt_override;
+ double *new_camera_position);
double accel_variance;
double noise_variance;
cv::KalmanFilter kalman;
@@ -38,7 +33,7 @@ public:
QElapsedTimer timer;
};
-class FTNOIR_FILTER_BASE_EXPORT FTNoIR_FilterDll : public Metadata
+class OPENTRACK_EXPORT FTNoIR_FilterDll : public Metadata
{
public:
void getFullName(QString *strToBeFilled) { *strToBeFilled = QString("Kalman filter"); }
@@ -47,7 +42,7 @@ public:
void getIcon(QIcon *icon){ *icon = QIcon(":/images/filter-16.png"); }
};
-class FTNOIR_FILTER_BASE_EXPORT FilterControls: public QWidget, public IFilterDialog
+class OPENTRACK_EXPORT FilterControls: public QWidget, public IFilterDialog
{
Q_OBJECT
public:
@@ -58,8 +53,8 @@ public:
show();
}
Ui::KalmanUICFilterControls ui;
- virtual void registerFilter(IFilter*) virt_override {}
- virtual void unregisterFilter() virt_override {}
+ void registerFilter(IFilter*) override {}
+ void unregisterFilter() override {}
public slots:
void doOK();
void doCancel();
diff --git a/ftnoir_filter_kalman/kalman.cpp b/ftnoir_filter_kalman/kalman.cpp
index 388390f3..62d5ff98 100644
--- a/ftnoir_filter_kalman/kalman.cpp
+++ b/ftnoir_filter_kalman/kalman.cpp
@@ -5,9 +5,9 @@
* copyright notice and this permission notice appear in all copies.
*/
#include "ftnoir_filter_kalman.h"
-#include "facetracknoir/global-settings.h"
+#include "facetracknoir/plugin-support.h"
#include <QDebug>
-#include <math.h>
+#include <cmath>
FTNoIR_Filter::FTNoIR_Filter() {
reset();
@@ -118,16 +118,16 @@ void FilterControls::doCancel() {
close();
}
-extern "C" FTNOIR_FILTER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata()
+extern "C" OPENTRACK_EXPORT Metadata* GetMetadata()
{
return new FTNoIR_FilterDll;
}
-extern "C" FTNOIR_FILTER_BASE_EXPORT IFilter* CALLING_CONVENTION GetConstructor()
+extern "C" OPENTRACK_EXPORT IFilter* GetConstructor()
{
return new FTNoIR_Filter;
}
-extern "C" FTNOIR_FILTER_BASE_EXPORT IFilterDialog* CALLING_CONVENTION GetDialog() {
+extern "C" OPENTRACK_EXPORT IFilterDialog* GetDialog() {
return new FilterControls;
}