summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--FaceTrackNoIR.suobin310272 -> 310784 bytes
-rw-r--r--FaceTrackNoIR/ExcelServer.cpp24
-rw-r--r--FaceTrackNoIR/tracker.cpp6
-rw-r--r--bin/FaceTrackNoIR.exebin729088 -> 729088 bytes
4 files changed, 29 insertions, 1 deletions
diff --git a/FaceTrackNoIR.suo b/FaceTrackNoIR.suo
index 69dd478c..846c4be4 100644
--- a/FaceTrackNoIR.suo
+++ b/FaceTrackNoIR.suo
Binary files differ
diff --git a/FaceTrackNoIR/ExcelServer.cpp b/FaceTrackNoIR/ExcelServer.cpp
index d512ef7a..097be513 100644
--- a/FaceTrackNoIR/ExcelServer.cpp
+++ b/FaceTrackNoIR/ExcelServer.cpp
@@ -32,6 +32,7 @@
#include <QtGui>
#include "ExcelServer.h"
#include "Tracker.h"
+#include <Windows.h>
/** constructor **/
ExcelServer::ExcelServer( Tracker *parent ) {
@@ -48,6 +49,21 @@ ExcelServer::~ExcelServer() {
// Update Headpose in Game.
//
void ExcelServer::sendHeadposeToGame() {
+SYSTEMTIME now;
+
+ //
+ // Get the System-time and substract the time from the previous call.
+ // dT will be used for the EWMA-filter.
+ //
+ GetSystemTime ( &now );
+ long newHeadPoseTime = (((now.wHour * 3600) + (now.wMinute * 60) + now.wSecond) * 1000) + now.wMilliseconds;
+
+ // Use this for some debug-output to file...
+ QFile data(QCoreApplication::applicationDirPath() + "\\output.txt");
+ if (data.open(QFile::WriteOnly | QFile::Append)) {
+ QTextStream out(&data);
+ out << newHeadPoseTime << "\t" << headRotX << "\t" << virtRotX << "\t" << headRotY << "\t" << virtRotY << "\t" << headRotZ << "\t" << virtRotZ << '\n';
+ }
}
//
@@ -56,6 +72,14 @@ void ExcelServer::sendHeadposeToGame() {
//
bool ExcelServer::checkServerInstallationOK( HANDLE handle )
{
+ // Use this for some debug-output to file...
+ QFile data(QCoreApplication::applicationDirPath() + "\\output.txt");
+ if (data.open(QFile::WriteOnly)) {
+ QTextStream out(&data);
+ out << "Time" << "\t" << "RotX (Pitch)" << "\t" << "RotX (Pitch)" << "\t" << "RotY (Yaw)" << "\t" << "RotY (Yaw)" << "\t" << "RotY (Roll)" << "\t" << "RotY (Roll)" << '\n';
+ out << "(long)" << "\t" << "Raw" << "\t" << "Filtered" << "\t" << "Raw" << "\t" << "Filtered" << "\t" << "Raw" << "\t" << "Filtered" << '\n';
+ }
+
return true;
}
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index 6e360ade..633af24e 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -618,8 +618,12 @@ void Tracker::run() {
ReleaseMutex(Tracker::hTrackMutex);
server_Game->sendHeadposeToGame();
+# ifdef USE_DEBUG_CLIENT
+ debug_Client->sendHeadposeToGame();
+# endif
+
//for lower cpu load
- msleep(10);
+ usleep(10000);
yieldCurrentThread();
}
}
diff --git a/bin/FaceTrackNoIR.exe b/bin/FaceTrackNoIR.exe
index 111bb018..de14308a 100644
--- a/bin/FaceTrackNoIR.exe
+++ b/bin/FaceTrackNoIR.exe
Binary files differ