summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormm0zct <the_cartographer@hotmail.com>2013-10-21 21:14:05 +0100
committermm0zct <the_cartographer@hotmail.com>2013-10-21 21:14:05 +0100
commitbfcfdb8827507de1091d6b92081a78eb8e4df9da (patch)
tree2bc5dc67bfac87ae84009e0f16d2b0f36510a4e5
parent726875b0b40f8a43ae5ca763667dc707e84f39aa (diff)
parent732644b87e4fbc999170d13f6cda179113d3940b (diff)
Merge branch 'master' of https://github.com/opentrack/opentrack into feature/tracker_hotkeys
Conflicts: TODO.txt
-rw-r--r--TODO.txt12
-rw-r--r--facetracknoir/facetracknoir.cpp55
-rw-r--r--facetracknoir/facetracknoir.h2
-rw-r--r--facetracknoir/facetracknoir.ui1047
-rw-r--r--ftnoir_tracker_base/ftnoir_tracker_base.h2
-rw-r--r--ftnoir_tracker_ht/ftnoir_tracker_ht.cpp16
-rw-r--r--installer/opentrack-installer.iss6
7 files changed, 668 insertions, 472 deletions
diff --git a/TODO.txt b/TODO.txt
index ef4dc10e..927a5709 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -1,3 +1,12 @@
+20131020 sh
+ Add unit testing by means of batch execution, protocol/filter that does
+ nothing, add separate executables for readers of specific protocols,
+ and run continuous integration every time commit happens that day.
+
+ Add statically-typed settings trees, convert result to qsettings-enabled
+ ini files. Use metadata props in order to get class name for ini section.
+ Required here are also arrays of settings. Use QList<T> for template
+ specialization.
20131019 sh
Add a joystick tracker source, with selectable axes.
20131019 mm0zct
@@ -5,12 +14,13 @@
There are two main user bases, HMD and traditional monitor+webcam users,
each wants a drastically different curve profile (HMD is 1:1 on all axes)
Also re:boost, I'd rather avoid extra library dependences if possible.
-
+
Rift tracker could do with positional estimation using intertial sensors.
Rift could do with a return-yaw-to-centre hotkey that's not the global all-axis option.
Hydra is really just a hack just now, could be improved a lot.
Add per-tracker hotkey support
+
20131005 sh
what do you think about boost 1.54 for property maps -> qsettings?
also, boost concepts
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp
index 8786ed38..48bca959 100644
--- a/facetracknoir/facetracknoir.cpp
+++ b/facetracknoir/facetracknoir.cpp
@@ -102,7 +102,8 @@ FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WindowFlags flags) :
pSecondTrackerDialog(NULL),
pProtocolDialog(NULL),
pFilterDialog(NULL),
- looping(false)
+ looping(false),
+ kbd_quit(QKeySequence("Ctrl+Q"), this)
{
ui.setupUi(this);
setFixedSize(size());
@@ -167,24 +168,13 @@ FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WindowFlags flags) :
//Q_INIT_RESOURCE(PoseWidget);
- ui.lblX->setVisible(false);
- ui.lblY->setVisible(false);
- ui.lblZ->setVisible(false);
- ui.lblRotX->setVisible(false);
- ui.lblRotY->setVisible(false);
- ui.lblRotZ->setVisible(false);
-
- ui.lcdNumOutputPosX->setVisible(false);
- ui.lcdNumOutputPosY->setVisible(false);
- ui.lcdNumOutputPosZ->setVisible(false);
- ui.lcdNumOutputRotX->setVisible(false);
- ui.lcdNumOutputRotY->setVisible(false);
- ui.lcdNumOutputRotZ->setVisible(false);
-
#ifndef _WIN32
connect(&keyCenter, SIGNAL(activated()), this, SLOT(shortcutRecentered()));
connect(&keyToggle, SIGNAL(activated()), this, SLOT(shortcutToggled()));
#endif
+
+ connect(&kbd_quit, SIGNAL(activated()), this, SLOT(exit()));
+ kbd_quit.setEnabled(true);
}
/** destructor stops the engine and quits the faceapi **/
@@ -429,7 +419,7 @@ void FaceTrackNoIR::loadSettings() {
// Put the filename in the window-title.
//
QFileInfo pathInfo ( currentFile );
- setWindowTitle ( "opentrack 2.0a3 - " + pathInfo.fileName() );
+ setWindowTitle ( "opentrack 2.0a4 - " + pathInfo.fileName() );
//
// Get a List of all the INI-files in the (currently active) Settings-folder.
@@ -651,21 +641,7 @@ void FaceTrackNoIR::startTracker( ) {
//
// Start the timer to update the head-pose (digits and 'man in black')
//
- timUpdateHeadPose.start(40);
-
- ui.lblX->setVisible(true);
- ui.lblY->setVisible(true);
- ui.lblZ->setVisible(true);
- ui.lblRotX->setVisible(true);
- ui.lblRotY->setVisible(true);
- ui.lblRotZ->setVisible(true);
-
- ui.lcdNumOutputPosX->setVisible(true);
- ui.lcdNumOutputPosY->setVisible(true);
- ui.lcdNumOutputPosZ->setVisible(true);
- ui.lcdNumOutputRotX->setVisible(true);
- ui.lcdNumOutputRotY->setVisible(true);
- ui.lcdNumOutputRotZ->setVisible(true);
+ timUpdateHeadPose.start(50);
}
/** stop tracking the face **/
@@ -686,21 +662,6 @@ void FaceTrackNoIR::stopTracker( ) {
timUpdateHeadPose.stop();
ui.pose_display->rotateBy(0, 0, 0);
- ui.lblX->setVisible(false);
- ui.lblY->setVisible(false);
- ui.lblZ->setVisible(false);
- ui.lblRotX->setVisible(false);
- ui.lblRotY->setVisible(false);
- ui.lblRotZ->setVisible(false);
-
- ui.lcdNumOutputPosX->setVisible(false);
- ui.lcdNumOutputPosY->setVisible(false);
- ui.lcdNumOutputPosZ->setVisible(false);
- ui.lcdNumOutputRotX->setVisible(false);
- ui.lcdNumOutputRotY->setVisible(false);
- ui.lcdNumOutputRotZ->setVisible(false);
-
- //
// UnRegister the Tracker instance with the Tracker Dialog (if open)
//
if (pTrackerDialog) {
@@ -759,8 +720,6 @@ void FaceTrackNoIR::setInvertAxis(Axis axis, int invert ) {
void FaceTrackNoIR::showHeadPose() {
double newdata[6];
- const QString format("%1");
-
tracker->getHeadPose(newdata);
ui.lcdNumX->display(newdata[TX]);
ui.lcdNumY->display(newdata[TY]);
diff --git a/facetracknoir/facetracknoir.h b/facetracknoir/facetracknoir.h
index c5b2dc01..491274c8 100644
--- a/facetracknoir/facetracknoir.h
+++ b/facetracknoir/facetracknoir.h
@@ -38,6 +38,7 @@
#include <QtGui>
#include <QString>
#include <QByteArray>
+#include <QShortcut>
#if !defined(_WIN32)
# include "qxt-mini/QxtGlobalShortcut"
#else
@@ -123,6 +124,7 @@ private:
QList<DynamicLibrary*> dlopen_filters;
QList<DynamicLibrary*> dlopen_trackers;
QList<DynamicLibrary*> dlopen_protocols;
+ QShortcut kbd_quit;
#ifndef _WIN32
void bind_keyboard_shortcut(QxtGlobalShortcut& key, const QString label, QSettings& iniFile);
diff --git a/facetracknoir/facetracknoir.ui b/facetracknoir/facetracknoir.ui
index 5bda6067..7ef41537 100644
--- a/facetracknoir/facetracknoir.ui
+++ b/facetracknoir/facetracknoir.ui
@@ -142,7 +142,7 @@
<property name="geometry">
<rect>
<x>120</x>
- <y>40</y>
+ <y>60</y>
<width>203</width>
<height>97</height>
</rect>
@@ -163,33 +163,29 @@
<string notr="true"/>
</property>
<property name="alignment">
- <set>Qt::AlignJustify|Qt::AlignVCenter</set>
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="flat">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout_8">
- <item row="1" column="0">
- <widget class="QLabel" name="lblY">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLCDNumber" name="lcdNumOutputPosX">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMaximumSize</enum>
+ </property>
+ <property name="leftMargin">
+ <number>2</number>
+ </property>
+ <property name="topMargin">
+ <number>2</number>
+ </property>
+ <property name="rightMargin">
+ <number>2</number>
+ </property>
+ <property name="bottomMargin">
+ <number>6</number>
+ </property>
+ <item row="0" column="3">
+ <widget class="QLCDNumber" name="lcdNumOutputRotX">
<property name="enabled">
<bool>true</bool>
</property>
@@ -214,16 +210,19 @@
<property name="smallDecimalPoint">
<bool>false</bool>
</property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
<property name="digitCount">
<number>5</number>
</property>
<property name="segmentStyle">
- <enum>QLCDNumber::Filled</enum>
+ <enum>QLCDNumber::Flat</enum>
</property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QLCDNumber" name="lcdNumOutputRotY">
+ <item row="1" column="1">
+ <widget class="QLCDNumber" name="lcdNumOutputPosY">
<property name="enabled">
<bool>true</bool>
</property>
@@ -248,16 +247,45 @@
<property name="smallDecimalPoint">
<bool>false</bool>
</property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
<property name="digitCount">
<number>5</number>
</property>
<property name="segmentStyle">
- <enum>QLCDNumber::Filled</enum>
+ <enum>QLCDNumber::Flat</enum>
</property>
</widget>
</item>
- <item row="0" column="3">
- <widget class="QLCDNumber" name="lcdNumOutputRotX">
+ <item row="2" column="2">
+ <widget class="QLabel" name="lblRotZ">
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>roll</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLabel" name="lblRotY">
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>pitch</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QLCDNumber" name="lcdNumOutputRotY">
<property name="enabled">
<bool>true</bool>
</property>
@@ -282,16 +310,19 @@
<property name="smallDecimalPoint">
<bool>false</bool>
</property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
<property name="digitCount">
<number>5</number>
</property>
<property name="segmentStyle">
- <enum>QLCDNumber::Filled</enum>
+ <enum>QLCDNumber::Flat</enum>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="lblZ">
+ <item row="0" column="1">
+ <widget class="QLCDNumber" name="lcdNumOutputPosX">
<property name="enabled">
<bool>true</bool>
</property>
@@ -304,21 +335,26 @@
<property name="autoFillBackground">
<bool>false</bool>
</property>
- <property name="text">
- <string>Z</string>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
</property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="lblRotY">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
+ <property name="frameShadow">
+ <enum>QFrame::Plain</enum>
</property>
- <property name="text">
- <string>pitch</string>
+ <property name="lineWidth">
+ <number>1</number>
+ </property>
+ <property name="smallDecimalPoint">
+ <bool>false</bool>
+ </property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
+ <property name="digitCount">
+ <number>5</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
</property>
</widget>
</item>
@@ -348,11 +384,14 @@
<property name="smallDecimalPoint">
<bool>false</bool>
</property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
<property name="digitCount">
<number>5</number>
</property>
<property name="segmentStyle">
- <enum>QLCDNumber::Filled</enum>
+ <enum>QLCDNumber::Flat</enum>
</property>
</widget>
</item>
@@ -364,21 +403,37 @@
<height>65536</height>
</size>
</property>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
<property name="text">
<string>X</string>
</property>
</widget>
</item>
- <item row="2" column="2">
- <widget class="QLabel" name="lblRotZ">
+ <item row="1" column="0">
+ <widget class="QLabel" name="lblY">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
<property name="maximumSize">
<size>
<width>65536</width>
<height>65536</height>
</size>
</property>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
<property name="text">
- <string>roll</string>
+ <string>Y</string>
</property>
</widget>
</item>
@@ -408,16 +463,19 @@
<property name="smallDecimalPoint">
<bool>false</bool>
</property>
+ <property name="numDigits">
+ <number>5</number>
+ </property>
<property name="digitCount">
<number>5</number>
</property>
<property name="segmentStyle">
- <enum>QLCDNumber::Filled</enum>
+ <enum>QLCDNumber::Flat</enum>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLCDNumber" name="lcdNumOutputPosY">
+ <item row="2" column="0">
+ <widget class="QLabel" name="lblZ">
<property name="enabled">
<bool>true</bool>
</property>
@@ -427,26 +485,16 @@
<height>65536</height>
</size>
</property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="lineWidth">
- <number>1</number>
+ <property name="font">
+ <font>
+ <pointsize>9</pointsize>
+ </font>
</property>
- <property name="smallDecimalPoint">
+ <property name="autoFillBackground">
<bool>false</bool>
</property>
- <property name="digitCount">
- <number>5</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Filled</enum>
+ <property name="text">
+ <string>Z</string>
</property>
</widget>
</item>
@@ -468,9 +516,9 @@
<widget class="GLWidget" name="pose_display" native="true">
<property name="geometry">
<rect>
- <x>10</x>
- <y>40</y>
- <width>90</width>
+ <x>20</x>
+ <y>50</y>
+ <width>81</width>
<height>100</height>
</rect>
</property>
@@ -499,7 +547,7 @@
<x>350</x>
<y>370</y>
<width>191</width>
- <height>80</height>
+ <height>91</height>
</rect>
</property>
<property name="minimumSize">
@@ -524,7 +572,7 @@
<set>Qt::AlignCenter</set>
</property>
<property name="flat">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="checkable">
<bool>false</bool>
@@ -583,7 +631,7 @@
<property name="geometry">
<rect>
<x>580</x>
- <y>470</y>
+ <y>460</y>
<width>171</width>
<height>38</height>
</rect>
@@ -621,7 +669,7 @@
</property>
<property name="iconSize">
<size>
- <width>120</width>
+ <width>98</width>
<height>24</height>
</size>
</property>
@@ -629,9 +677,9 @@
<widget class="QLabel" name="game_name">
<property name="geometry">
<rect>
- <x>350</x>
+ <x>130</x>
<y>36</y>
- <width>371</width>
+ <width>651</width>
<height>20</height>
</rect>
</property>
@@ -649,7 +697,7 @@
<property name="geometry">
<rect>
<x>350</x>
- <y>262</y>
+ <y>270</y>
<width>191</width>
<height>91</height>
</rect>
@@ -676,7 +724,7 @@
<set>Qt::AlignCenter</set>
</property>
<property name="flat">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="checkable">
<bool>false</bool>
@@ -732,9 +780,9 @@
<property name="geometry">
<rect>
<x>350</x>
- <y>70</y>
+ <y>60</y>
<width>191</width>
- <height>83</height>
+ <height>91</height>
</rect>
</property>
<property name="minimumSize">
@@ -759,7 +807,7 @@
<set>Qt::AlignCenter</set>
</property>
<property name="flat">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="checkable">
<bool>false</bool>
@@ -811,333 +859,12 @@
</item>
</layout>
</widget>
- <widget class="QGroupBox" name="groupBox">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>420</y>
- <width>321</width>
- <height>131</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="title">
- <string>Raw data</string>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- <layout class="QGridLayout" name="gridLayout_7" rowstretch="0,0,0" columnstretch="6,6,6,6" rowminimumheight="6,6,6" columnminimumwidth="6,6,6,6">
- <property name="spacing">
- <number>6</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="label_4">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="text">
- <string>TX</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLCDNumber" name="lcdNumX">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <property name="midLineWidth">
- <number>0</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>false</bool>
- </property>
- <property name="digitCount">
- <number>5</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="label_9">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="text">
- <string>yaw</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLCDNumber" name="lcdNumRotX">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <property name="midLineWidth">
- <number>0</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>false</bool>
- </property>
- <property name="digitCount">
- <number>5</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_5">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="text">
- <string>TY</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLCDNumber" name="lcdNumY">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <property name="midLineWidth">
- <number>0</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>false</bool>
- </property>
- <property name="digitCount">
- <number>5</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="label_8">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="text">
- <string>pitch</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLCDNumber" name="lcdNumRotY">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <property name="midLineWidth">
- <number>0</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>false</bool>
- </property>
- <property name="digitCount">
- <number>5</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_6">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="text">
- <string>TZ</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLCDNumber" name="lcdNumZ">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <property name="midLineWidth">
- <number>0</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>false</bool>
- </property>
- <property name="digitCount">
- <number>5</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="label_7">
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="text">
- <string>roll</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLCDNumber" name="lcdNumRotZ">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="maximumSize">
- <size>
- <width>65536</width>
- <height>65536</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <property name="midLineWidth">
- <number>0</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>false</bool>
- </property>
- <property name="digitCount">
- <number>5</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
<widget class="QLabel" name="cameraName">
<property name="geometry">
<rect>
- <x>350</x>
+ <x>130</x>
<y>10</y>
- <width>371</width>
+ <width>651</width>
<height>25</height>
</rect>
</property>
@@ -1184,7 +911,7 @@
<set>Qt::AlignCenter</set>
</property>
<property name="flat">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="checkable">
<bool>false</bool>
@@ -1319,9 +1046,9 @@
<property name="geometry">
<rect>
<x>350</x>
- <y>180</y>
+ <y>160</y>
<width>191</width>
- <height>83</height>
+ <height>91</height>
</rect>
</property>
<property name="minimumSize">
@@ -1343,7 +1070,7 @@
<set>Qt::AlignCenter</set>
</property>
<property name="flat">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="checkable">
<bool>false</bool>
@@ -1422,6 +1149,9 @@
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
<layout class="QGridLayout" name="gridLayout_9" rowstretch="0" columnstretch="0,0" rowminimumheight="0" columnminimumwidth="0,0">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
@@ -1476,7 +1206,7 @@
<property name="geometry">
<rect>
<x>580</x>
- <y>420</y>
+ <y>410</y>
<width>171</width>
<height>38</height>
</rect>
@@ -1506,7 +1236,7 @@
<string>Edit the Keyboard and mouse shortcuts</string>
</property>
<property name="text">
- <string>Shortcuts</string>
+ <string>Keys</string>
</property>
<property name="icon">
<iconset resource="main-facetracknoir.qrc">
@@ -1514,7 +1244,7 @@
</property>
<property name="iconSize">
<size>
- <width>24</width>
+ <width>98</width>
<height>24</height>
</size>
</property>
@@ -1546,6 +1276,9 @@
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
<layout class="QGridLayout" name="gridLayout_5" rowstretch="6,6,6" columnstretch="6,6" rowminimumheight="6,6,6" columnminimumwidth="6,6">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
@@ -1637,6 +1370,492 @@
</item>
</layout>
</widget>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>420</y>
+ <width>131</width>
+ <height>111</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Raw translation</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMaximumSize</enum>
+ </property>
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::FieldsStayAtSizeHint</enum>
+ </property>
+ <property name="rowWrapPolicy">
+ <enum>QFormLayout::DontWrapRows</enum>
+ </property>
+ <property name="labelAlignment">
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ <property name="formAlignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ <property name="leftMargin">
+ <number>6</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>TX</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLCDNumber" name="lcdNumX">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>12</pointsize>
+ </font>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="smallDecimalPoint">
+ <bool>false</bool>
+ </property>
+ <property name="digitCount">
+ <number>4</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>TY</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLCDNumber" name="lcdNumY">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>12</pointsize>
+ </font>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="smallDecimalPoint">
+ <bool>false</bool>
+ </property>
+ <property name="digitCount">
+ <number>4</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>TZ</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLCDNumber" name="lcdNumZ">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>12</pointsize>
+ </font>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="smallDecimalPoint">
+ <bool>false</bool>
+ </property>
+ <property name="digitCount">
+ <number>4</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QGroupBox" name="groupBox_2">
+ <property name="geometry">
+ <rect>
+ <x>190</x>
+ <y>420</y>
+ <width>131</width>
+ <height>111</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Raw rotation</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMaximumSize</enum>
+ </property>
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::FieldsStayAtSizeHint</enum>
+ </property>
+ <property name="rowWrapPolicy">
+ <enum>QFormLayout::DontWrapRows</enum>
+ </property>
+ <property name="labelAlignment">
+ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+ </property>
+ <property name="formAlignment">
+ <set>Qt::AlignBottom|Qt::AlignHCenter</set>
+ </property>
+ <property name="leftMargin">
+ <number>6</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>yaw</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLCDNumber" name="lcdNumRotX">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>12</pointsize>
+ </font>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="smallDecimalPoint">
+ <bool>false</bool>
+ </property>
+ <property name="digitCount">
+ <number>4</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_8">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>pitch</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLCDNumber" name="lcdNumRotY">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>12</pointsize>
+ </font>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="smallDecimalPoint">
+ <bool>false</bool>
+ </property>
+ <property name="digitCount">
+ <number>4</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>roll</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLCDNumber" name="lcdNumRotZ">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>65536</width>
+ <height>65536</height>
+ </size>
+ </property>
+ <property name="font">
+ <font>
+ <pointsize>12</pointsize>
+ </font>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="lineWidth">
+ <number>0</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="smallDecimalPoint">
+ <bool>false</bool>
+ </property>
+ <property name="digitCount">
+ <number>4</number>
+ </property>
+ <property name="segmentStyle">
+ <enum>QLCDNumber::Flat</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ <zorder>lcdNumRotZ</zorder>
+ <zorder>label_8</zorder>
+ <zorder>label_7</zorder>
+ <zorder>lcdNumRotY</zorder>
+ <zorder>lcdNumRotX</zorder>
+ <zorder>label_9</zorder>
+ </widget>
</widget>
</widget>
<layoutdefault spacing="0" margin="0"/>
diff --git a/ftnoir_tracker_base/ftnoir_tracker_base.h b/ftnoir_tracker_base/ftnoir_tracker_base.h
index 8b720620..84629547 100644
--- a/ftnoir_tracker_base/ftnoir_tracker_base.h
+++ b/ftnoir_tracker_base/ftnoir_tracker_base.h
@@ -44,7 +44,7 @@ struct ITracker
virtual ~ITracker() = 0;
virtual void StartTracker( QFrame* frame ) = 0;
virtual bool GiveHeadPoseData(double *data) = 0;
- virtual void HotkeyCallback(unsigned int *) = 0;
+// virtual void HotkeyCallback(unsigned int *) = 0;
};
inline ITracker::~ITracker() { }
diff --git a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
index 14cd3942..62606395 100644
--- a/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
+++ b/ftnoir_tracker_ht/ftnoir_tracker_ht.cpp
@@ -97,10 +97,10 @@ static void load_settings(ht_config_t* config, Tracker* tracker)
iniFile.beginGroup( "HT-Tracker" );
config->classification_delay = 500;
config->field_of_view = iniFile.value("fov", 52).toFloat();
- config->pyrlk_pyramids = 3;
+ config->pyrlk_pyramids = 2;
config->pyrlk_win_size_w = config->pyrlk_win_size_h = 21;
- config->max_keypoints = 200;
- config->keypoint_distance = 4.5;
+ config->max_keypoints = 250;
+ config->keypoint_distance = 4.2;
//config->force_width = 640;
//config->force_height = 480;
config->force_fps = iniFile.value("fps", 0).toInt();
@@ -111,14 +111,14 @@ static void load_settings(ht_config_t* config, Tracker* tracker)
config->ransac_abs_max_mean_error = 15;
config->ransac_max_mean_error = 4.5;
config->debug = 0;
- config->ransac_min_features = 0.8;
+ config->ransac_min_features = 0.78;
int res = iniFile.value("resolution", 0).toInt();
if (res < 0 || res >= (int)(sizeof(resolution_choices) / sizeof(resolution_tuple)))
res = 0;
resolution_tuple r = resolution_choices[res];
config->force_width = r.width;
config->force_height = r.height;
- config->flandmark_delay = 200;
+ config->flandmark_delay = 250;
qDebug() << "width" << r.width << "height" << r.height;
if (tracker)
{
@@ -224,6 +224,12 @@ bool Tracker::GiveHeadPoseData(double *data)
if (enableTZ)
data[TZ] = shm->result.tz;
ret = true;
+ if (fabs(data[Yaw]) > 60 || fabs(data[Pitch]) > 50 || fabs(data[Roll]) > 40)
+ {
+ shm->pause = true;
+ }
+ } else {
+ shm->pause = false;
}
lck_shm.unlock();
diff --git a/installer/opentrack-installer.iss b/installer/opentrack-installer.iss
index dc6e624b..60d9963b 100644
--- a/installer/opentrack-installer.iss
+++ b/installer/opentrack-installer.iss
@@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "opentrack"
-#define MyAppVersion "2.0a3"
+#define MyAppVersion "2.0a4"
#define MyAppPublisher "opentrack"
#define MyAppURL "http://github.com/opentrack/opentrack"
#define MyAppExeName "opentrack.exe"
@@ -23,7 +23,7 @@ DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputBaseFilename=opentrack-setup-{#MyAppVersion}
-SetupIconFile=C:\Users\Administrator\SDK\opentrack\facetracknoir\facetracknoir.ico
+SetupIconFile=d:\opentrack-win32-sdk\opentrack\facetracknoir\facetracknoir.ico
Compression=lzma/ultra64
SolidCompression=yes
DisableWelcomePage=True
@@ -41,7 +41,7 @@ Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
-Source: "C:\Users\Administrator\SDK\opentrack\install\*"; DestDir: "{app}"; Flags: ignoreversion createallsubdirs recursesubdirs
+Source: "d:\opentrack-win32-sdk\opentrack\build\install\*"; DestDir: "{app}"; Flags: ignoreversion createallsubdirs recursesubdirs
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"