diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-03-22 21:48:28 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-03-22 21:51:09 +0100 |
commit | 4f05cb2af239ca8471b77c9f1d1c32e8c4cd3abc (patch) | |
tree | 338d3891b0c7710558aea3820d42af6eedfb0af9 /ftnoir_tracker_fd/ftnoir_tracker_fd.h | |
parent | 4f00c4c74d213a37a4b1a3313e50ce2b4dd51271 (diff) |
Remove .bat files, actually finish rename this time
Diffstat (limited to 'ftnoir_tracker_fd/ftnoir_tracker_fd.h')
-rw-r--r-- | ftnoir_tracker_fd/ftnoir_tracker_fd.h | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/ftnoir_tracker_fd/ftnoir_tracker_fd.h b/ftnoir_tracker_fd/ftnoir_tracker_fd.h new file mode 100644 index 00000000..02e95bb4 --- /dev/null +++ b/ftnoir_tracker_fd/ftnoir_tracker_fd.h @@ -0,0 +1,114 @@ +#include "..\ftnoir_tracker_base\ftnoir_tracker_base.h"
+#include "face-detect.h"
+#include "ui_FTNoIR_FD_controls.h"
+
+#include <Qt>
+#include <QtCore/QEvent>
+#include <Qt/qt_windows.h>
+
+#include <QMessageBox>
+#include <QSettings>
+#include <QProcess>
+#include "math.h"
+#include <Windows.h>
+
+using namespace std;
+
+static LPTSTR prog_cmdline = (LPTSTR) TEXT("face-detect.exe");
+static LPTSTR fd_shm_name = (LPTSTR) TEXT("face-detect-shm");
+static LPTSTR fd_mutex_name = (LPTSTR) TEXT("face-detect-mutex");
+
+class VideoWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ VideoWidget(HANDLE hMutex, unsigned char* data, struct face_detect_shm* shm);
+protected:
+ void paintEvent(QPaintEvent*);
+private:
+ HANDLE hMutex;
+ unsigned char* data;
+ struct face_detect_shm* shm;
+};
+
+class FTNoIR_Tracker : public ITracker
+{
+public:
+ FTNoIR_Tracker();
+ ~FTNoIR_Tracker();
+
+ void Initialize( QFrame *videoframe );
+ void StartTracker( HWND parent_window );
+ void StopTracker( bool exit );
+ bool GiveHeadPoseData(THeadPoseData *data); // Returns true if confidence is good
+
+ void loadSettings();
+// bool setParameterValue(const int index, const float newvalue);
+ bool notifyZeroed();
+ void refreshVideo();
+
+private:
+ bool activep;
+ //QList<std::pair<float,float>> parameterRange;
+ //QList<float> parameterValueAsFloat;
+ void TerminateTracker();
+ HANDLE hMutex, hMapFile;
+ struct face_detect_shm* shm;
+ PROCESS_INFORMATION procInfo;
+ VideoWidget* ctrl;
+ QFrame* qframe;
+};
+
+class TrackerControls: public QWidget, Ui::UICFDClientControls, public ITrackerDialog
+{
+ Q_OBJECT
+public:
+
+ explicit TrackerControls();
+ virtual ~TrackerControls();
+ void Release(); // Member functions which are accessible from outside the DLL
+ void Initialize(QWidget *parent);
+ void registerTracker(ITracker *tracker) {};
+ void unRegisterTracker() {};
+ void NotifyZeroing();
+
+private:
+ Ui::UICFDClientControls ui;
+ void loadSettings();
+ void save();
+
+ bool settingsDirty;
+ HANDLE hMapFile, hMutex;
+ struct face_detect_shm* shm;
+
+private slots:
+ void doOK();
+ void doCancel();
+ void settingChanged() { settingsDirty = true; };
+ void doSetRedetectMs(int val);
+ void doSetCameraId(int val);
+ void doSetVideoWidget(bool val);
+signals:
+};
+
+//*******************************************************************************************************
+// FaceTrackNoIR Tracker DLL. Functions used to get general info on the Tracker
+//*******************************************************************************************************
+class FTNoIR_TrackerDll : public ITrackerDll
+{
+public:
+ FTNoIR_TrackerDll();
+ ~FTNoIR_TrackerDll();
+
+ void Initialize();
+
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
+ void getIcon(QIcon *icon);
+
+private:
+ QString trackerFullName; // Trackers' name and description
+ QString trackerShortName;
+ QString trackerDescription;
+};
|