summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_sm
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-10-25 04:15:00 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-10-25 04:16:24 +0200
commite4d69fcaaca33952ed0c807500a4e93bbc0a365b (patch)
treebe0e2a90c32df21e3184b50a249577438ff2d04a /ftnoir_tracker_sm
parent8769b18f24c7866d6e7c59494acd7f4369dbe18d (diff)
remove faceapi
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'ftnoir_tracker_sm')
-rw-r--r--ftnoir_tracker_sm/ftnoir_sm_controls.ui223
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp220
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp188
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_faceapi_dll.cpp72
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_sm.h120
-rw-r--r--ftnoir_tracker_sm/ftnoir_tracker_sm_types.h36
-rw-r--r--ftnoir_tracker_sm/images/sm.pngbin1263 -> 0 bytes
-rw-r--r--ftnoir_tracker_sm/sm-tracker.qrc5
8 files changed, 0 insertions, 864 deletions
diff --git a/ftnoir_tracker_sm/ftnoir_sm_controls.ui b/ftnoir_tracker_sm/ftnoir_sm_controls.ui
deleted file mode 100644
index ecc252f1..00000000
--- a/ftnoir_tracker_sm/ftnoir_sm_controls.ui
+++ /dev/null
@@ -1,223 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>UICSMClientControls</class>
- <widget class="QWidget" name="UICSMClientControls">
- <property name="windowModality">
- <enum>Qt::ApplicationModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>174</width>
- <height>188</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>faceAPI tracker settings FaceTrackNoIR</string>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>images/sm.png</normaloff>images/sm.png</iconset>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <property name="sizeConstraint">
- <enum>QLayout::SetMaximumSize</enum>
- </property>
- <item row="0" column="0">
- <widget class="QGroupBox" name="groupBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Axis enablement</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <property name="labelAlignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="formAlignment">
- <set>Qt::AlignHCenter|Qt::AlignTop</set>
- </property>
- <property name="leftMargin">
- <number>10</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Roll:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QCheckBox" name="chkEnableRoll">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>Pitch:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkEnablePitch">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Yaw:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkEnableYaw">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_12">
- <property name="text">
- <string>X:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QCheckBox" name="chkEnableX">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_13">
- <property name="text">
- <string>Y:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QCheckBox" name="chkEnableY">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_14">
- <property name="text">
- <string>Z:</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QCheckBox" name="chkEnableZ">
- <property name="maximumSize">
- <size>
- <width>20</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
- <slots>
- <slot>startEngineClicked()</slot>
- <slot>stopEngineClicked()</slot>
- <slot>cameraSettingsClicked()</slot>
- </slots>
-</ui>
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp b/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
deleted file mode 100644
index 18182153..00000000
--- a/ftnoir_tracker_sm/ftnoir_tracker_faceapi.cpp
+++ /dev/null
@@ -1,220 +0,0 @@
-/********************************************************************************
-* FaceTrackNoIR This program is a private project of some enthusiastic *
-* gamers from Holland, who don't like to pay much for *
-* head-tracking. *
-* *
-* Copyright (C) 2012 Wim Vriend (Developing) *
-* Ron Hendriks (Researching and Testing) *
-* *
-* Homepage: http://facetracknoir.sourceforge.net/home/default.htm *
-* *
-* This program is free software; you can redistribute it and/or modify it *
-* under the terms of the GNU General Public License as published by the *
-* Free Software Foundation; either version 3 of the License, or (at your *
-* option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, but *
-* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
-* more details. *
-* *
-* You should have received a copy of the GNU General Public License along *
-* with this program; if not, see <http://www.gnu.org/licenses/>. *
-* *
-********************************************************************************/
-#include <QtGui>
-#include <QMessageBox>
-#include "facetracknoir/global-settings.h"
-#include <QThread>
-#include "ftnoir_tracker_sm/ftnoir_tracker_sm.h"
-
-FTNoIR_Tracker::FTNoIR_Tracker() : shm(SM_MM_DATA, SM_MUTEX, sizeof(SMMemMap)), started(false)
-{
- pMemData = (SMMemMap*) shm.mem;
-}
-
-static void wait_for_cmd(SMMemMap *pMemData, PortableLockedShm& shm) {
- qDebug() << "faceapi: waiting for cmd";
- for (int _ = 0; _ < 3000; _++)
- {
- bool br = false;
- shm.lock();
- if (pMemData->command == 0)
- {
- br = true;
- }
- shm.unlock();
- if (br)
- break;
- QThread::msleep(1);
- }
- qDebug() << "faceapi: done waiting for cmd";
-}
-
-// Send a command without parameter-value to the tracking Engine.
-//
-void FTNoIR_Tracker::doCommand(int command)
-{
- shm.lock();
- pMemData->command = command;
- shm.unlock();
- wait_for_cmd(pMemData, shm);
-}
-
-//
-// Send a command with integer parameter-value to the tracking Engine.
-//
-void FTNoIR_Tracker::doCommand(int command, int value)
-{
- shm.lock();
- pMemData->command = command; // Send command
- pMemData->par_val_int = value;
- shm.unlock();
- wait_for_cmd(pMemData, shm);
-}
-
-FTNoIR_Tracker::~FTNoIR_Tracker()
-{
- qDebug() << "~FTNoIR_Tracker says: cleaning up";
-
- bEnableRoll = true;
- bEnablePitch = true;
- bEnableYaw = true;
- bEnableX = true;
- bEnableY = true;
- bEnableZ = true;
-}
-
-void FTNoIR_Tracker::StartTracker(QFrame *videoframe )
-{
- qDebug() << "FTNoIR_Tracker::Initialize says: Starting ";
- QMessageBox::warning(videoframe,
- "Non-free software deprecation",
- "SM FaceAPI is deprecated, hence this annoying message.\n"
- "It'll be removed for 2.0-final.\n"
- "The goal is to have only open-source software available.",
- QMessageBox::Ok, QMessageBox::NoButton);
-
- loadSettings();
-
- if ( pMemData != NULL ) {
- pMemData->command = 0; // Reset any and all commands
- if (videoframe != NULL) {
- pMemData->handle = (HWND) videoframe->winId(); // Handle of Videoframe widget
- }
- else {
- pMemData->handle = NULL; // reset Handle of Videoframe widget
- }
- }
-
- //
- // Start FTNoIR_FaceAPI_EXE.exe. The exe contains all faceAPI-stuff and is non-Qt...
- //
- // XXX TODO isolate it into separate directory
- faceAPI = new QProcess();
- faceAPI->setWorkingDirectory(QCoreApplication::applicationDirPath() + "/faceapi");
- faceAPI->start("\"" + QCoreApplication::applicationDirPath() + "/faceapi/opentrack-faceapi-wrapper" + "\"");
- // Show the video widget
- qDebug() << "FTNoIR_Tracker::Initialize says: videoframe = " << videoframe;
- if (videoframe != NULL) {
- videoframe->show();
- }
-}
-
-void FTNoIR_Tracker::WaitForExit()
-{
-
- qDebug() << "FTNoIR_Tracker::StopTracker says: Starting ";
- // stops the faceapi engine
- if ( pMemData != NULL ) {
-// if (exit == true) {
- pMemData->command = FT_SM_EXIT;
- //}
- //else {
- // pMemData->command = FT_SM_STOP; // Issue 'stop' command
- //}
- }
-}
-
-bool FTNoIR_Tracker::GiveHeadPoseData(double *data)
-{
- if (!started)
- doStartEngine();
- started = true;
- //
- // Check if the pointer is OK and wait for the Mutex.
- //
- shm.lock();
-
- //
- // Copy the measurements to FaceTrackNoIR.
- //
- if (bEnableX) {
- data[TX] = pMemData->data.new_pose.head_pos.x * 100.0f; // From meters to centimeters
- }
- if (bEnableY) {
- data[TY] = pMemData->data.new_pose.head_pos.y * 100.0f;
- }
- if (bEnableZ) {
- data[TZ] = pMemData->data.new_pose.head_pos.z * 100.0f;
- }
- if (bEnableYaw) {
- data[Yaw] = pMemData->data.new_pose.head_rot.y_rads * 57.295781f; // From rads to degrees
- }
- if (bEnablePitch) {
- data[Pitch] = pMemData->data.new_pose.head_rot.x_rads * 57.295781f;
- }
- if (bEnableRoll) {
- data[Roll] = pMemData->data.new_pose.head_rot.z_rads * 57.295781f;
- }
-
- //
- // Reset the handshake, to let faceAPI know we're still here!
- //
- pMemData->handshake = 0;
- shm.unlock();
-
- return ( pMemData->data.new_pose.confidence > 0 );
-}
-
-//
-// Load the current Settings from the currently 'active' INI-file.
-//
-void FTNoIR_Tracker::loadSettings() {
-
- qDebug() << "FTNoIR_Tracker::loadSettings says: Starting ";
- QSettings settings("opentrack"); // Registry settings (in HK_USER)
-
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString();
- QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
-
- qDebug() << "FTNoIR_Tracker::loadSettings says: iniFile = " << currentFile;
-
- iniFile.beginGroup ( "SMTracker" );
- if (pMemData) {
- pMemData->initial_filter_level = iniFile.value ( "FilterLevel", 1 ).toInt();
- }
-
- bEnableRoll = iniFile.value ( "EnableRoll", 1 ).toBool();
- bEnablePitch = iniFile.value ( "EnablePitch", 1 ).toBool();
- bEnableYaw = iniFile.value ( "EnableYaw", 1 ).toBool();
- bEnableX = iniFile.value ( "EnableX", 1 ).toBool();
- bEnableY = iniFile.value ( "EnableY", 1 ).toBool();
- bEnableZ = iniFile.value ( "EnableZ", 1 ).toBool();
-
- iniFile.endGroup ();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Factory function that creates instances if the Tracker object.
-
-// Export both decorated and undecorated names.
-// GetTracker - Undecorated name, which can be easily used with GetProcAddress
-// Win32 API function.
-// _GetTracker@0 - Common name decoration for __stdcall functions in C language.
-//#pragma comment(linker, "/export:GetTracker=_GetTracker@0")
-
-extern "C" FTNOIR_TRACKER_BASE_EXPORT ITracker* CALLING_CONVENTION GetConstructor()
-{
- return new FTNoIR_Tracker;
-}
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp b/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp
deleted file mode 100644
index 3510f3e9..00000000
--- a/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dialog.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-/********************************************************************************
-* FaceTrackNoIR This program is a private project of some enthusiastic *
-* gamers from Holland, who don't like to pay much for *
-* head-tracking. *
-* *
-* Copyright (C) 2012 Wim Vriend (Developing) *
-* Ron Hendriks (Researching and Testing) *
-* *
-* Homepage: http://facetracknoir.sourceforge.net/home/default.htm *
-* *
-* This program is free software; you can redistribute it and/or modify it *
-* under the terms of the GNU General Public License as published by the *
-* Free Software Foundation; either version 3 of the License, or (at your *
-* option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, but *
-* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
-* more details. *
-* *
-* You should have received a copy of the GNU General Public License along *
-* with this program; if not, see <http://www.gnu.org/licenses/>. *
-* *
-********************************************************************************/
-#include <QtGui>
-#include "ftnoir_tracker_sm/ftnoir_tracker_sm.h"
-#include "facetracknoir/global-settings.h"
-
-//*******************************************************************************************************
-// faceAPI Client Settings-dialog.
-//*******************************************************************************************************
-
-//
-// Constructor for server-settings-dialog
-//
-TrackerControls::TrackerControls() : settingsDirty(false)
-{
- ui.setupUi( this );
-
- //connect(ui.cbxFilterSetting, SIGNAL(currentIndexChanged(int)), this, SLOT(doSetFilter( int )));
- //connect(ui.btnCameraSettings, SIGNAL(clicked()), this, SLOT(doShowCam()));
-
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
-
- connect(ui.chkEnableRoll, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
- connect(ui.chkEnablePitch, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
- connect(ui.chkEnableYaw, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
- connect(ui.chkEnableX, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
- connect(ui.chkEnableY, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
- connect(ui.chkEnableZ, SIGNAL(setChecked(int)), this, SLOT(settingChanged(int)));
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOk()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doOCancel()));
-}
-
-//
-// Destructor for server-dialog
-//
-TrackerControls::~TrackerControls() {
- qDebug() << "~TrackerControls() says: started";
-}
-
-//
-// Initialize tracker-client-dialog
-//
-void TrackerControls::Initialize(QWidget *parent) {
-
- QPoint offsetpos(200, 200);
- if (parent) {
- this->move(parent->pos() + offsetpos);
- }
-
- // Load the settings from the current .INI-file
- loadSettings();
-
- show();
-}
-
-//
-// OK clicked on server-dialog
-//
-void TrackerControls::doOK() {
- save();
- this->close();
-}
-
-// override show event
-void TrackerControls::showEvent ( QShowEvent * event ) {
- loadSettings();
-}
-
-//
-// Cancel clicked on server-dialog
-//
-void TrackerControls::doCancel() {
- //
- // Ask if changed Settings should be saved
- //
- if (settingsDirty) {
- int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
-
- qDebug() << "doCancel says: answer =" << ret;
-
- switch (ret) {
- case QMessageBox::Save:
- save();
- this->close();
- break;
- case QMessageBox::Discard:
- this->close();
- break;
- case QMessageBox::Cancel:
- // Cancel was clicked
- break;
- default:
- // should never be reached
- break;
- }
- }
- else {
- this->close();
- }
-}
-
-//
-// Load the current Settings from the currently 'active' INI-file.
-//
-void TrackerControls::loadSettings() {
-
-// qDebug() << "loadSettings says: Starting ";
- QSettings settings("opentrack"); // Registry settings (in HK_USER)
-
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString();
- QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
-
-// qDebug() << "loadSettings says: iniFile = " << currentFile;
-
- iniFile.beginGroup ( "SMTracker" );
- ui.chkEnableRoll->setChecked(iniFile.value ( "EnableRoll", 1 ).toBool());
- ui.chkEnablePitch->setChecked(iniFile.value ( "EnablePitch", 1 ).toBool());
- ui.chkEnableYaw->setChecked(iniFile.value ( "EnableYaw", 1 ).toBool());
- ui.chkEnableX->setChecked(iniFile.value ( "EnableX", 1 ).toBool());
- ui.chkEnableY->setChecked(iniFile.value ( "EnableY", 1 ).toBool());
- ui.chkEnableZ->setChecked(iniFile.value ( "EnableZ", 1 ).toBool());
-
- iniFile.endGroup ();
-
- settingsDirty = false;
-}
-
-//
-// Save the current Settings to the currently 'active' INI-file.
-//
-void TrackerControls::save() {
-
- QSettings settings("opentrack"); // Registry settings (in HK_USER)
-
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString();
- QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
-
- iniFile.beginGroup ( "SMTracker" );
- iniFile.setValue ( "EnableRoll", ui.chkEnableRoll->isChecked() );
- iniFile.setValue ( "EnablePitch", ui.chkEnablePitch->isChecked() );
- iniFile.setValue ( "EnableYaw", ui.chkEnableYaw->isChecked() );
- iniFile.setValue ( "EnableX", ui.chkEnableX->isChecked() );
- iniFile.setValue ( "EnableY", ui.chkEnableY->isChecked() );
- iniFile.setValue ( "EnableZ", ui.chkEnableZ->isChecked() );
-
- iniFile.endGroup ();
-
- settingsDirty = false;
-}
-
-
-
-////////////////////////////////////////////////////////////////////////////////
-// Factory function that creates instances if the Tracker-settings dialog object.
-
-// Export both decorated and undecorated names.
-// GetTrackerDialog - Undecorated name, which can be easily used with GetProcAddress
-// Win32 API function.
-// _GetTrackerDialog@0 - Common name decoration for __stdcall functions in C language.
-//#pragma comment(linker, "/export:GetTrackerDialog=_GetTrackerDialog@0")
-
-extern "C" FTNOIR_TRACKER_BASE_EXPORT ITrackerDialog* CALLING_CONVENTION GetDialog()
-{
- return new TrackerControls;
-}
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dll.cpp b/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dll.cpp
deleted file mode 100644
index b1ab1d75..00000000
--- a/ftnoir_tracker_sm/ftnoir_tracker_faceapi_dll.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/********************************************************************************
-* FaceTrackNoIR This program is a private project of some enthusiastic *
-* gamers from Holland, who don't like to pay much for *
-* head-tracking. *
-* *
-* Copyright (C) 2012 Wim Vriend (Developing) *
-* Ron Hendriks (Researching and Testing) *
-* *
-* Homepage *
-* *
-* This program is free software; you can redistribute it and/or modify it *
-* under the terms of the GNU General Public License as published by the *
-* Free Software Foundation; either version 3 of the License, or (at your *
-* option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, but *
-* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
-* more details. *
-* *
-* You should have received a copy of the GNU General Public License along *
-* with this program; if not, see <http://www.gnu.org/licenses/>. *
-* *
-********************************************************************************/
-#include "ftnoir_tracker_sm.h"
-#include <QDebug>
-#include "facetracknoir/global-settings.h"
-
-FTNoIR_TrackerDll::FTNoIR_TrackerDll() {
- //populate the description strings
- trackerFullName = "faceAPI V3.2.6";
- trackerShortName = "faceAPI";
- trackerDescription = "SeeingMachines faceAPI V3.2.6";
-}
-
-FTNoIR_TrackerDll::~FTNoIR_TrackerDll()
-{
-
-}
-void FTNoIR_TrackerDll::getFullName(QString *strToBeFilled)
-{
- *strToBeFilled = trackerFullName;
-};
-
-void FTNoIR_TrackerDll::getShortName(QString *strToBeFilled)
-{
- *strToBeFilled = trackerShortName;
-};
-
-void FTNoIR_TrackerDll::getDescription(QString *strToBeFilled)
-{
- *strToBeFilled = trackerDescription;
-};
-
-void FTNoIR_TrackerDll::getIcon(QIcon *icon)
-{
- *icon = QIcon(":/images/sm.png");
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// Factory function that creates instances if the Tracker object.
-
-// Export both decorated and undecorated names.
-// GetTrackerDll - Undecorated name, which can be easily used with GetProcAddress
-// Win32 API function.
-// _GetTrackerDll@0 - Common name decoration for __stdcall functions in C language.
-//#pragma comment(linker, "/export:GetTrackerDll=_GetTrackerDll@0")
-
-extern "C" FTNOIR_TRACKER_BASE_EXPORT Metadata* CALLING_CONVENTION GetMetadata()
-{
- return new FTNoIR_TrackerDll;
-}
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_sm.h b/ftnoir_tracker_sm/ftnoir_tracker_sm.h
deleted file mode 100644
index 4089983d..00000000
--- a/ftnoir_tracker_sm/ftnoir_tracker_sm.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/********************************************************************************
-* FaceTrackNoIR This program is a private project of some enthusiastic *
-* gamers from Holland, who don't like to pay much for *
-* head-tracking. *
-* *
-* Copyright (C) 2012 Wim Vriend (Developing) *
-* Ron Hendriks (Researching and Testing) *
-* *
-* Homepage: http://facetracknoir.sourceforge.net/home/default.htm *
-* *
-* This program is free software; you can redistribute it and/or modify it *
-* under the terms of the GNU General Public License as published by the *
-* Free Software Foundation; either version 3 of the License, or (at your *
-* option) any later version. *
-* *
-* This program is distributed in the hope that it will be useful, but *
-* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
-* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
-* more details. *
-* *
-* You should have received a copy of the GNU General Public License along *
-* with this program; if not, see <http://www.gnu.org/licenses/>. *
-* *
-********************************************************************************/
-#include <QObject>
-#include <QWidget>
-#include <QMessageBox>
-#include <QSettings>
-#include <QProcess>
-#include <windows.h>
-#include "math.h"
-#include "facetracknoir/global-settings.h"
-#include "compat/compat.h"
-#include <QFrame>
-#include "ftnoir_tracker_base/ftnoir_tracker_base.h"
-#include "ftnoir_tracker_sm/ftnoir_tracker_sm_types.h"
-#include "ui_ftnoir_sm_controls.h"
-
-using namespace std;
-
-class FTNoIR_Tracker : public ITracker
-{
-public:
- FTNoIR_Tracker();
- ~FTNoIR_Tracker();
-
- void StartTracker( QFrame* parent_window );
- void StopTracker( bool exit );
- bool GiveHeadPoseData(double *data); // Returns true if confidence is good
- void WaitForExit();
- void doCommand(int foo);
- void doCommand(int foo, int bar);
- void doStartEngine(){
- doCommand(FT_SM_START);
- doCommand(FT_SM_SET_PAR_FILTER, 0);
- //doCommand(FT_SM_SHOW_CAM);
- }
- void loadSettings();
-
-private:
- //
- // global variables
- //
- PortableLockedShm shm;
- SMMemMap *pMemData;
- QProcess *faceAPI;
-
- bool bEnableRoll;
- bool bEnablePitch;
- bool bEnableYaw;
- bool bEnableX;
- bool bEnableY;
- bool bEnableZ;
- bool started;
-};
-
-class TrackerControls: public QWidget, public ITrackerDialog
-{
- Q_OBJECT
-public:
- explicit TrackerControls();
- virtual ~TrackerControls();
- void showEvent ( QShowEvent * event );
-
- void Initialize(QWidget *parent);
- void registerTracker(ITracker *tracker) {
- }
- void unRegisterTracker() {
- }
-protected slots:
- void doOK();
- void doCancel();
- void save();
- void settingChanged() { settingsDirty = true; }
- void settingChanged(int) { settingsDirty = true; }
-private:
- Ui::UICSMClientControls ui;
- void loadSettings();
- bool settingsDirty;
-};
-
-//*******************************************************************************************************
-// FaceTrackNoIR Tracker DLL. Functions used to get general info on the Tracker
-//*******************************************************************************************************
-class FTNoIR_TrackerDll : public Metadata
-{
-public:
- FTNoIR_TrackerDll();
- ~FTNoIR_TrackerDll();
-
- 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;
-};
diff --git a/ftnoir_tracker_sm/ftnoir_tracker_sm_types.h b/ftnoir_tracker_sm/ftnoir_tracker_sm_types.h
deleted file mode 100644
index 526f8cdc..00000000
--- a/ftnoir_tracker_sm/ftnoir_tracker_sm_types.h
+++ /dev/null
@@ -1,36 +0,0 @@
-//
-// Definitions for the Shared Memory to send the data to FaceTrackNoIR
-//
-#define SM_MM_DATA "SM_SharedMem"
-#define SM_FACEAPI "SM_FaceAPI"
-#define SM_MUTEX "SM_Mutex"
-
-#include "faceapi/stdafx.h"
-#include <sm_api.h>
-
-struct TFaceData {
- int DataID;
- smEngineHeadPoseData new_pose;
-};
-typedef TFaceData * PFaceData;
-
-struct SMMemMap {
- int command; // Command from FaceTrackNoIR
- int status; // Status from faceAPI
- TFaceData data;
- HANDLE handle;
- int state;
- int par_val_int; // Value of parameter, indicated by 'command'
- int par_val_float;
- int initial_filter_level; // Internal faceAPI Filter level
- int handshake;
-};
-typedef SMMemMap * PSMMemMap;
-
-enum FTNoIR_Tracker_Command {
- FT_SM_START = 10,
- FT_SM_STOP = 20,
- FT_SM_SHOW_CAM = 30,
- FT_SM_SET_PAR_FILTER = 50,
- FT_SM_EXIT = 100
-};
diff --git a/ftnoir_tracker_sm/images/sm.png b/ftnoir_tracker_sm/images/sm.png
deleted file mode 100644
index 4910d1f0..00000000
--- a/ftnoir_tracker_sm/images/sm.png
+++ /dev/null
Binary files differ
diff --git a/ftnoir_tracker_sm/sm-tracker.qrc b/ftnoir_tracker_sm/sm-tracker.qrc
deleted file mode 100644
index d17d0899..00000000
--- a/ftnoir_tracker_sm/sm-tracker.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>images/sm.png</file>
- </qresource>
-</RCC>