diff options
-rw-r--r-- | FaceTrackNoIR/FTNoIR_Curves.ui | 701 | ||||
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.cpp | 120 | ||||
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.vcproj | 16 | ||||
-rw-r--r-- | FaceTrackNoIR/FaceTrackNoIR.vcproj.VRIEND200810.Wim.user | 65 | ||||
-rw-r--r-- | FaceTrackNoIR/tracker.cpp | 224 | ||||
-rw-r--r-- | FaceTrackNoIR/tracker.h | 47 | ||||
-rw-r--r-- | bin/FunctionConfig.h | bin | 0 -> 3182 bytes | |||
-rw-r--r-- | bin/QBezierConfigurator.dll | bin | 49152 -> 0 bytes | |||
-rw-r--r-- | bin/QBezierConfigurator.lib | bin | 22348 -> 0 bytes | |||
-rw-r--r-- | bin/QFunctionConfigurator.lib | bin | 0 -> 27136 bytes | |||
-rw-r--r-- | bin/Settings/ArmA.ini | 72 | ||||
-rw-r--r-- | bin/Settings/FreeFalcon.ini | 4 | ||||
-rw-r--r-- | bin/qbezierconfigurator.h | 130 | ||||
-rw-r--r-- | bin/qfunctionconfigurator.h | 177 | ||||
-rw-r--r-- | bin/zlib1.dll | bin | 61952 -> 70656 bytes | |||
-rw-r--r-- | faceAPI/FaceAPI2FSX.vcproj | 2 |
16 files changed, 558 insertions, 1000 deletions
diff --git a/FaceTrackNoIR/FTNoIR_Curves.ui b/FaceTrackNoIR/FTNoIR_Curves.ui index c13565e2..d7ed1fe5 100644 --- a/FaceTrackNoIR/FTNoIR_Curves.ui +++ b/FaceTrackNoIR/FTNoIR_Curves.ui @@ -6,8 +6,8 @@ <rect>
<x>0</x>
<y>0</y>
- <width>757</width>
- <height>603</height>
+ <width>858</width>
+ <height>605</height>
</rect>
</property>
<property name="windowTitle">
@@ -97,7 +97,7 @@ color: rgb(255, 255, 255); <string notr="true"/>
</property>
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="rotation_tab">
<attribute name="icon">
@@ -112,24 +112,30 @@ color: rgb(255, 255, 255); <rect>
<x>10</x>
<y>10</y>
- <width>708</width>
- <height>511</height>
+ <width>794</width>
+ <height>488</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QBezierConfigurator" name="curveYaw">
- <property name="maxInputEGU" stdset="0">
- <number>50</number>
- </property>
- <property name="maxOutputEGU" stdset="0">
- <number>180</number>
+ <item row="0" column="1">
+ <widget class="QFunctionConfigurator" name="qFunctionPitch">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
</property>
<property name="colorBezier">
<color>
- <red>255</red>
- <green>170</green>
- <blue>0</blue>
+ <red>0</red>
+ <green>255</green>
+ <blue>255</blue>
</color>
</property>
<property name="colorBackground">
@@ -140,41 +146,32 @@ color: rgb(255, 255, 255); </color>
</property>
<property name="stringInputEGU" stdset="0">
- <string>Input Yaw (degr.)</string>
+ <string>Input Pitch Up (degr.)</string>
</property>
<property name="stringOutputEGU" stdset="0">
- <string>Output Yaw (degr.)</string>
- </property>
- <property name="stringCaption" stdset="0">
- <string>Yaw (left and right)</string>
- </property>
- <property name="pointOne" stdset="0">
- <pointf>
- <x>0.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
- </property>
- <property name="pointThree" stdset="0">
- <pointf>
- <x>90.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
+ <string>Output Pitch Up (degr.)</string>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QBezierConfigurator" name="curvePitch">
- <property name="maxInputEGU" stdset="0">
- <number>50</number>
- </property>
- <property name="maxOutputEGU" stdset="0">
- <number>180</number>
+ <item row="0" column="2">
+ <widget class="QFunctionConfigurator" name="qFunctionRoll">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
</property>
<property name="colorBezier">
<color>
<red>0</red>
<green>255</green>
- <blue>255</blue>
+ <blue>0</blue>
</color>
</property>
<property name="colorBackground">
@@ -185,40 +182,31 @@ color: rgb(255, 255, 255); </color>
</property>
<property name="stringInputEGU" stdset="0">
- <string>Input Pitch (degr.)</string>
+ <string>Input Roll (degr.)</string>
</property>
<property name="stringOutputEGU" stdset="0">
- <string>Output Pitch (degr.)</string>
- </property>
- <property name="stringCaption" stdset="0">
- <string>Pitch (forward and backward)</string>
- </property>
- <property name="pointOne" stdset="0">
- <pointf>
- <x>0.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
- </property>
- <property name="pointThree" stdset="0">
- <pointf>
- <x>90.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
+ <string>Output Roll (degr.)</string>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QBezierConfigurator" name="curveRoll">
- <property name="maxInputEGU" stdset="0">
- <number>50</number>
- </property>
- <property name="maxOutputEGU" stdset="0">
- <number>180</number>
+ <item row="0" column="0">
+ <widget class="QFunctionConfigurator" name="qFunctionYaw">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
</property>
<property name="colorBezier">
<color>
- <red>0</red>
- <green>255</green>
+ <red>255</red>
+ <green>170</green>
<blue>0</blue>
</color>
</property>
@@ -230,140 +218,78 @@ color: rgb(255, 255, 255); </color>
</property>
<property name="stringInputEGU" stdset="0">
- <string>Input Roll (degr.)</string>
+ <string>Input Yaw (degr.)</string>
</property>
<property name="stringOutputEGU" stdset="0">
- <string>Output Roll (degr.)</string>
+ <string>Output Yaw (degr.)</string>
</property>
- <property name="stringCaption" stdset="0">
- <string>Roll (left and right)</string>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QFunctionConfigurator" name="qFunctionPitchDown">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
</property>
- <property name="pointOne" stdset="0">
- <pointf>
- <x>0.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
+ <property name="colorBezier">
+ <color>
+ <red>0</red>
+ <green>255</green>
+ <blue>255</blue>
+ </color>
</property>
- <property name="pointThree" stdset="0">
- <pointf>
- <x>90.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
+ <property name="colorBackground">
+ <color>
+ <red>192</red>
+ <green>192</green>
+ <blue>192</blue>
+ </color>
</property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QSpinBox" name="spinNZ_Yaw">
- <property name="maximum">
- <number>50</number>
+ <property name="stringInputEGU" stdset="0">
+ <string>Input Pitch Down (degr.)</string>
</property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>NeutralZone</string>
+ <property name="stringOutputEGU" stdset="0">
+ <string>Output Pitch Down (degr.)</string>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>NeutralZone</string>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>25</height>
+ </size>
</property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="label_3">
<property name="text">
- <string>NeutralZone</string>
+ <string>Left-click the graph to place a new point, right-click a point to remove. Left-click and drag to move a point.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
- <widget class="QSpinBox" name="spinNZ_Pitch">
- <property name="maximum">
- <number>50</number>
+ <widget class="QWidget" name="widget_3" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>170</width>
+ <height>140</height>
+ </size>
</property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QSpinBox" name="spinNZ_Roll">
- <property name="maximum">
- <number>50</number>
+ <property name="styleSheet">
+ <string notr="true">image: url(:/images/rotation_DOFs.png);</string>
</property>
</widget>
</item>
- <item row="1" column="3">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QWidget" name="widget" native="true">
- <property name="minimumSize">
- <size>
- <width>170</width>
- <height>140</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>170</width>
- <height>140</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">image: url(:/images/rotation_DOFs.png);
-background-color: rgb(255, 255, 255);</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="3">
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Maximum</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>115</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QLabel" name="label_9">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>25</height>
- </size>
- </property>
- <property name="text">
- <string>Use the circular handles to change</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_8">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>25</height>
- </size>
- </property>
- <property name="text">
- <string>the curve(s).</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
</layout>
</widget>
</widget>
@@ -378,26 +304,32 @@ background-color: rgb(255, 255, 255);</string> <widget class="QWidget" name="verticalLayoutWidget_2">
<property name="geometry">
<rect>
- <x>10</x>
+ <x>30</x>
<y>10</y>
- <width>708</width>
- <height>491</height>
+ <width>794</width>
+ <height>388</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_3">
- <item row="1" column="0">
- <widget class="QBezierConfigurator" name="curveY">
- <property name="maxInputEGU" stdset="0">
- <number>50</number>
- </property>
- <property name="maxOutputEGU" stdset="0">
- <number>180</number>
+ <item row="0" column="0">
+ <widget class="QFunctionConfigurator" name="qFunctionX">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
</property>
<property name="colorBezier">
<color>
- <red>0</red>
- <green>0</green>
- <blue>255</blue>
+ <red>255</red>
+ <green>255</green>
+ <blue>0</blue>
</color>
</property>
<property name="colorBackground">
@@ -408,41 +340,32 @@ background-color: rgb(255, 255, 255);</string> </color>
</property>
<property name="stringInputEGU" stdset="0">
- <string>Input Move (cm)</string>
+ <string>Left/Right Input X (cm.)</string>
</property>
<property name="stringOutputEGU" stdset="0">
- <string>Output Move (cm)</string>
- </property>
- <property name="stringCaption" stdset="0">
- <string>Move (up and down)</string>
- </property>
- <property name="pointOne" stdset="0">
- <pointf>
- <x>0.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
- </property>
- <property name="pointThree" stdset="0">
- <pointf>
- <x>90.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
+ <string>Output X (cm.)</string>
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QBezierConfigurator" name="curveZ">
- <property name="maxInputEGU" stdset="0">
- <number>50</number>
- </property>
- <property name="maxOutputEGU" stdset="0">
- <number>180</number>
+ <item row="0" column="1">
+ <widget class="QFunctionConfigurator" name="qFunctionY">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
</property>
<property name="colorBezier">
<color>
- <red>255</red>
+ <red>85</red>
<green>0</green>
- <blue>0</blue>
+ <blue>255</blue>
</color>
</property>
<property name="colorBackground">
@@ -453,40 +376,31 @@ background-color: rgb(255, 255, 255);</string> </color>
</property>
<property name="stringInputEGU" stdset="0">
- <string>Input Move (cm)</string>
+ <string>Up/Down Input Y (cm.)</string>
</property>
<property name="stringOutputEGU" stdset="0">
- <string>Output Move (cm)</string>
- </property>
- <property name="stringCaption" stdset="0">
- <string>Move (forward and backward)</string>
- </property>
- <property name="pointOne" stdset="0">
- <pointf>
- <x>0.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
- </property>
- <property name="pointThree" stdset="0">
- <pointf>
- <x>90.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
+ <string>Output Y (cm.)</string>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QBezierConfigurator" name="curveX">
- <property name="maxInputEGU" stdset="0">
- <number>50</number>
- </property>
- <property name="maxOutputEGU" stdset="0">
- <number>180</number>
+ <item row="0" column="2">
+ <widget class="QFunctionConfigurator" name="qFunctionZ">
+ <property name="minimumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>260</width>
+ <height>240</height>
+ </size>
</property>
<property name="colorBezier">
<color>
<red>255</red>
- <green>255</green>
+ <green>0</green>
<blue>0</blue>
</color>
</property>
@@ -498,87 +412,53 @@ background-color: rgb(255, 255, 255);</string> </color>
</property>
<property name="stringInputEGU" stdset="0">
- <string>Input Move (cm)</string>
+ <string>Forward/Backward Input Z (cm.)</string>
</property>
<property name="stringOutputEGU" stdset="0">
- <string>Output Move (cm)</string>
- </property>
- <property name="stringCaption" stdset="0">
- <string>Move (left and right)</string>
- </property>
- <property name="pointOne" stdset="0">
- <pointf>
- <x>0.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
- </property>
- <property name="pointThree" stdset="0">
- <pointf>
- <x>90.000000000000000</x>
- <y>0.000000000000000</y>
- </pointf>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>NeutralZone</string>
+ <string>Output Z (cm.)</string>
</property>
</widget>
</item>
- <item row="0" column="2">
- <widget class="QSpinBox" name="spinNZ_X">
- <property name="maximum">
- <number>50</number>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>25</height>
+ </size>
</property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="label_5">
<property name="text">
- <string>NeutralZone</string>
+ <string>Left-click the graph to place a new point, right-click a point to remove. Left-click and drag to move a point.</string>
</property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>NeutralZone</string>
+ <property name="wordWrap">
+ <bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
- <widget class="QSpinBox" name="spinNZ_Y">
- <property name="maximum">
- <number>50</number>
- </property>
+ <widget class="QWidget" name="widget_2" native="true">
+ <property name="minimumSize">
+ <size>
+ <width>170</width>
+ <height>140</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">image: url(:/images/translation_DOFs.png);</string>
+ </property>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>-40</x>
+ <y>0</y>
+ <width>260</width>
+ <height>140</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_5"/>
+ </widget>
</widget>
</item>
- <item row="2" column="2">
- <widget class="QSpinBox" name="spinNZ_Z">
- <property name="maximum">
- <number>50</number>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QWidget" name="widget_2" native="true">
- <property name="minimumSize">
- <size>
- <width>170</width>
- <height>140</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">image: url(:/images/translation_DOFs.png);</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
</layout>
</widget>
</widget>
@@ -680,208 +560,15 @@ background-color: rgb(255, 255, 255);</string> </widget>
<customwidgets>
<customwidget>
- <class>QBezierConfigurator</class>
+ <class>QFunctionConfigurator</class>
<extends>QWidget</extends>
- <header>qbezierconfigurator.h</header>
+ <header>qfunctionconfigurator.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="FaceTrackNoIR.qrc"/>
</resources>
- <connections>
- <connection>
- <sender>curveYaw</sender>
- <signal>valueNeutralZoneChanged(int)</signal>
- <receiver>spinNZ_Yaw</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>268</x>
- <y>114</y>
- </hint>
- <hint type="destinationlabel">
- <x>593</x>
- <y>125</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinNZ_Yaw</sender>
- <signal>valueChanged(int)</signal>
- <receiver>curveYaw</receiver>
- <slot>setNeutralZone(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>588</x>
- <y>115</y>
- </hint>
- <hint type="destinationlabel">
- <x>296</x>
- <y>110</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>curvePitch</sender>
- <signal>valueNeutralZoneChanged(int)</signal>
- <receiver>spinNZ_Pitch</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>321</x>
- <y>280</y>
- </hint>
- <hint type="destinationlabel">
- <x>576</x>
- <y>289</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinNZ_Pitch</sender>
- <signal>valueChanged(int)</signal>
- <receiver>curvePitch</receiver>
- <slot>setNeutralZone(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>629</x>
- <y>287</y>
- </hint>
- <hint type="destinationlabel">
- <x>334</x>
- <y>285</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>curveRoll</sender>
- <signal>valueNeutralZoneChanged(int)</signal>
- <receiver>spinNZ_Roll</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>322</x>
- <y>423</y>
- </hint>
- <hint type="destinationlabel">
- <x>589</x>
- <y>447</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinNZ_Roll</sender>
- <signal>valueChanged(int)</signal>
- <receiver>curveRoll</receiver>
- <slot>setNeutralZone(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>618</x>
- <y>446</y>
- </hint>
- <hint type="destinationlabel">
- <x>257</x>
- <y>464</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>curveX</sender>
- <signal>valueNeutralZoneChanged(int)</signal>
- <receiver>spinNZ_X</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>312</x>
- <y>107</y>
- </hint>
- <hint type="destinationlabel">
- <x>568</x>
- <y>126</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinNZ_X</sender>
- <signal>valueChanged(int)</signal>
- <receiver>curveX</receiver>
- <slot>setNeutralZone(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>548</x>
- <y>125</y>
- </hint>
- <hint type="destinationlabel">
- <x>322</x>
- <y>142</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>curveY</sender>
- <signal>valueNeutralZoneChanged(int)</signal>
- <receiver>spinNZ_Y</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>282</x>
- <y>261</y>
- </hint>
- <hint type="destinationlabel">
- <x>569</x>
- <y>286</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinNZ_Y</sender>
- <signal>valueChanged(int)</signal>
- <receiver>curveY</receiver>
- <slot>setNeutralZone(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>549</x>
- <y>282</y>
- </hint>
- <hint type="destinationlabel">
- <x>342</x>
- <y>292</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>curveZ</sender>
- <signal>valueNeutralZoneChanged(int)</signal>
- <receiver>spinNZ_Z</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>363</x>
- <y>417</y>
- </hint>
- <hint type="destinationlabel">
- <x>571</x>
- <y>445</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinNZ_Z</sender>
- <signal>valueChanged(int)</signal>
- <receiver>curveZ</receiver>
- <slot>setNeutralZone(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>546</x>
- <y>444</y>
- </hint>
- <hint type="destinationlabel">
- <x>316</x>
- <y>447</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
<slots>
<slot>startEngineClicked()</slot>
<slot>stopEngineClicked()</slot>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp index afa5f9ef..3e0d6628 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.cpp +++ b/FaceTrackNoIR/FaceTrackNoIR.cpp @@ -23,6 +23,7 @@ *********************************************************************************/
/*
Modifications (last one on top):
+ 20120717 - WVR: FunctionConfig is now used for the Curves, instead of BezierConfig.
20120427 - WVR: The Protocol-code was already in separate DLLs, but the ListBox was still filled ´statically´. Now, a Dir() of the
EXE-folder is done, to locate Protocol-DLLs. The Icons were also moved to the DLLs
20120317 - WVR: The Filter and Tracker-code was moved to separate DLLs. The calling-method
@@ -38,6 +39,7 @@ */
#include "FaceTrackNoIR.h"
#include "tracker.h"
+//#include "FunctionConfig.h"
//#define USE_VISAGE
@@ -709,7 +711,7 @@ void FaceTrackNoIR::startTracker( ) { //
// Start the timer to update the head-pose (digits and 'man in black')
//
- timUpdateHeadPose->start(10);
+ timUpdateHeadPose->start(50);
ui.lblX->setVisible(true);
ui.lblY->setVisible(true);
@@ -1126,7 +1128,7 @@ importGetTrackerDialog getTracker; ui.iconcomboProtocol->clear();
for ( int i = 0; i < protocolFileList.size(); i++) {
- qDebug() << "createIconGroupBox says: ProtocolName = " << protocolFileList.at(i);
+// qDebug() << "createIconGroupBox says: ProtocolName = " << protocolFileList.at(i);
//
// Delete the existing QDialog
@@ -1148,7 +1150,7 @@ importGetTrackerDialog getTracker; pProtocolDialog = ptrXyz;
pProtocolDialog->getFullName( protocolName );
pProtocolDialog->getIcon( protocolIcon );
- qDebug() << "FaceTrackNoIR::showServerControls GetProtocolDialog Function Resolved!";
+// qDebug() << "FaceTrackNoIR::showServerControls GetProtocolDialog Function Resolved!";
}
else {
qDebug() << "FaceTrackNoIR::showServerControls Function NOT Resolved!";
@@ -1177,7 +1179,7 @@ importGetTrackerDialog getTracker; ui.iconcomboFilter->clear();
for ( int i = 0; i < filterFileList.size(); i++) {
- qDebug() << "createIconGroupBox says: FilterName = " << filterFileList.at(i);
+// qDebug() << "createIconGroupBox says: FilterName = " << filterFileList.at(i);
//
// Delete the existing QDialog
@@ -1199,7 +1201,7 @@ importGetTrackerDialog getTracker; pFilterDialog = ptrXyz;
pFilterDialog->getFullName( filterName );
pFilterDialog->getIcon( filterIcon );
- qDebug() << "FaceTrackNoIR::showServerControls GetFilterDialog Function Resolved!";
+// qDebug() << "FaceTrackNoIR::showServerControls GetFilterDialog Function Resolved!";
}
else {
qDebug() << "FaceTrackNoIR::showServerControls Function NOT Resolved!";
@@ -1228,7 +1230,7 @@ importGetTrackerDialog getTracker; ui.iconcomboTrackerSource->clear();
for ( int i = 0; i < trackerFileList.size(); i++) {
- qDebug() << "createIconGroupBox says: TrackerName = " << trackerFileList.at(i);
+// qDebug() << "createIconGroupBox says: TrackerName = " << trackerFileList.at(i);
//
// Delete the existing QDialog
@@ -1250,7 +1252,7 @@ importGetTrackerDialog getTracker; pTrackerDialog = ptrXyz;
pTrackerDialog->getFullName( trackerName );
pTrackerDialog->getIcon( trackerIcon );
- qDebug() << "FaceTrackNoIR::showServerControls GetTrackerDialog Function Resolved!";
+// qDebug() << "FaceTrackNoIR::showServerControls GetTrackerDialog Function Resolved!";
}
else {
qDebug() << "FaceTrackNoIR::showServerControls Function NOT Resolved!";
@@ -1911,12 +1913,25 @@ QWidget( parent , f) connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
- connect(ui.curveYaw, SIGNAL(BezierCurveChanged(bool)), this, SLOT(curveChanged(bool)));
- connect(ui.curvePitch, SIGNAL(BezierCurveChanged(bool)), this, SLOT(curveChanged(bool)));
- connect(ui.curveRoll, SIGNAL(BezierCurveChanged(bool)), this, SLOT(curveChanged(bool)));
- connect(ui.curveX, SIGNAL(BezierCurveChanged(bool)), this, SLOT(curveChanged(bool)));
- connect(ui.curveY, SIGNAL(BezierCurveChanged(bool)), this, SLOT(curveChanged(bool)));
- connect(ui.curveZ, SIGNAL(BezierCurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ ui.qFunctionX->setConfig(Tracker::X.curvePtr);
+ connect(ui.qFunctionX, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ ui.qFunctionY->setConfig(Tracker::Y.curvePtr);
+ connect(ui.qFunctionY, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ ui.qFunctionZ->setConfig(Tracker::Z.curvePtr);
+ connect(ui.qFunctionZ, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+
+ ui.qFunctionYaw->setConfig(Tracker::Yaw.curvePtr);
+ connect(ui.qFunctionYaw, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ //
+ // There are 2 curves for Pitch: Up and Down. Users have indicated that, to be able to use visual Flight controls, it is necessary to have a 'slow' curve for Down...
+ //
+ ui.qFunctionPitch->setConfig(Tracker::Pitch.curvePtr);
+ connect(ui.qFunctionPitch, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+ ui.qFunctionPitchDown->setConfig(Tracker::Pitch.curvePtrAlt);
+ connect(ui.qFunctionPitchDown, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
+
+ ui.qFunctionRoll->setConfig(Tracker::Roll.curvePtr);
+ connect(ui.qFunctionRoll, SIGNAL(CurveChanged(bool)), this, SLOT(curveChanged(bool)));
// Load the settings from the current .INI-file
loadSettings();
@@ -1982,7 +1997,6 @@ void CurveConfigurationDialog::loadSettings() { int NeutralZone;
int sensYaw, sensPitch, sensRoll;
int sensX, sensY, sensZ;
-QPointF point1, point2, point3, point4;
qDebug() << "loadSettings says: Starting ";
QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
@@ -2003,43 +2017,10 @@ QPointF point1, point2, point3, point4; iniFile.endGroup ();
- iniFile.beginGroup ( "Curves" );
- getCurvePoints( &iniFile, "Yaw_", &point1, &point2, &point3, &point4, NeutralZone, sensYaw, 50, 180 );
- ui.curveYaw->setPointOne( point1 );
- ui.curveYaw->setPointTwo( point2 );
- ui.curveYaw->setPointThree( point3 );
- ui.curveYaw->setPointFour( point4 );
-
- getCurvePoints( &iniFile, "Pitch_", &point1, &point2, &point3, &point4, NeutralZone, sensPitch, 50, 180 );
- ui.curvePitch->setPointOne( point1 );
- ui.curvePitch->setPointTwo( point2 );
- ui.curvePitch->setPointThree( point3 );
- ui.curvePitch->setPointFour( point4 );
-
- getCurvePoints( &iniFile, "Roll_", &point1, &point2, &point3, &point4, NeutralZone, sensRoll, 50, 180 );
- ui.curveRoll->setPointOne( point1 );
- ui.curveRoll->setPointTwo( point2 );
- ui.curveRoll->setPointThree( point3 );
- ui.curveRoll->setPointFour( point4 );
-
- getCurvePoints( &iniFile, "X_", &point1, &point2, &point3, &point4, NeutralZone, sensX, 50, 180 );
- ui.curveX->setPointOne( point1 );
- ui.curveX->setPointTwo( point2 );
- ui.curveX->setPointThree( point3 );
- ui.curveX->setPointFour( point4 );
-
- getCurvePoints( &iniFile, "Y_", &point1, &point2, &point3, &point4, NeutralZone, sensY, 50, 180 );
- ui.curveY->setPointOne( point1 );
- ui.curveY->setPointTwo( point2 );
- ui.curveY->setPointThree( point3 );
- ui.curveY->setPointFour( point4 );
-
- getCurvePoints( &iniFile, "Z_", &point1, &point2, &point3, &point4, NeutralZone, sensZ, 50, 180 );
- ui.curveZ->setPointOne( point1 );
- ui.curveZ->setPointTwo( point2 );
- ui.curveZ->setPointThree( point3 );
- ui.curveZ->setPointFour( point4 );
- iniFile.endGroup ();
+ ui.qFunctionYaw->loadSettings(iniFile);
+ ui.qFunctionPitch->loadSettings(iniFile);
+ ui.qFunctionPitchDown->loadSettings(iniFile);
+ ui.qFunctionRoll->loadSettings(iniFile);
settingsDirty = false;
@@ -2057,38 +2038,11 @@ void CurveConfigurationDialog::save() { QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
- iniFile.beginGroup ( "Curves" );
- iniFile.setValue ("Yaw_point1", ui.curveYaw->getPointOne() );
- iniFile.setValue ("Yaw_point2", ui.curveYaw->getPointTwo() );
- iniFile.setValue ("Yaw_point3", ui.curveYaw->getPointThree() );
- iniFile.setValue ("Yaw_point4", ui.curveYaw->getPointFour() );
-
- iniFile.setValue ("Pitch_point1", ui.curvePitch->getPointOne() );
- iniFile.setValue ("Pitch_point2", ui.curvePitch->getPointTwo() );
- iniFile.setValue ("Pitch_point3", ui.curvePitch->getPointThree() );
- iniFile.setValue ("Pitch_point4", ui.curvePitch->getPointFour() );
-
- iniFile.setValue ("Roll_point1", ui.curveRoll->getPointOne() );
- iniFile.setValue ("Roll_point2", ui.curveRoll->getPointTwo() );
- iniFile.setValue ("Roll_point3", ui.curveRoll->getPointThree() );
- iniFile.setValue ("Roll_point4", ui.curveRoll->getPointFour() );
-
- iniFile.setValue ("X_point1", ui.curveX->getPointOne() );
- iniFile.setValue ("X_point2", ui.curveX->getPointTwo() );
- iniFile.setValue ("X_point3", ui.curveX->getPointThree() );
- iniFile.setValue ("X_point4", ui.curveX->getPointFour() );
-
- iniFile.setValue ("Y_point1", ui.curveY->getPointOne() );
- iniFile.setValue ("Y_point2", ui.curveY->getPointTwo() );
- iniFile.setValue ("Y_point3", ui.curveY->getPointThree() );
- iniFile.setValue ("Y_point4", ui.curveY->getPointFour() );
-
- iniFile.setValue ("Z_point1", ui.curveZ->getPointOne() );
- iniFile.setValue ("Z_point2", ui.curveZ->getPointTwo() );
- iniFile.setValue ("Z_point3", ui.curveZ->getPointThree() );
- iniFile.setValue ("Z_point4", ui.curveZ->getPointFour() );
-
- iniFile.endGroup ();
+ ui.qFunctionYaw->saveSettings(iniFile);
+ ui.qFunctionPitch->saveSettings(iniFile);
+ ui.qFunctionPitchDown->saveSettings(iniFile);
+ ui.qFunctionRoll->saveSettings(iniFile);
+
settingsDirty = false;
//
diff --git a/FaceTrackNoIR/FaceTrackNoIR.vcproj b/FaceTrackNoIR/FaceTrackNoIR.vcproj index e682f785..c6732a93 100644 --- a/FaceTrackNoIR/FaceTrackNoIR.vcproj +++ b/FaceTrackNoIR/FaceTrackNoIR.vcproj @@ -47,7 +47,7 @@ OmitFramePointers="false"
EnableFiberSafeOptimizations="false"
WholeProgramOptimization="false"
- AdditionalIncludeDirectories=".\GeneratedFiles;"$(QTDIR)\include";".\GeneratedFiles\$(ConfigurationName)";"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtNetwork";"$(QTDIR)\include\QtGui";"$(QTDIR)\include\QtOpenGL";"$(QTDIR)\include\QtWebKit";"$(QTDIR)\include\QtTest";"$(SolutionDir)\FTNoIR_Tracker_UDP";"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles";"$(SolutionDir)\FTNoIR_Filter_EWMA2";"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include";C:\Project\FaceTrackNoIR\VS2005\QBezierConfigurator\QBezierConfigurator"
+ AdditionalIncludeDirectories=".\GeneratedFiles;"$(QTDIR)\include";".\GeneratedFiles\$(ConfigurationName)";"$(QTDIR)\include\QtCore";"$(QTDIR)\include\QtNetwork";"$(QTDIR)\include\QtGui";"$(QTDIR)\include\QtOpenGL";"$(QTDIR)\include\QtWebKit";"$(QTDIR)\include\QtTest";"$(SolutionDir)\FTNoIR_Tracker_UDP";"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles";"$(SolutionDir)\FTNoIR_Filter_EWMA2";"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include""
PreprocessorDefinitions="UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_THREAD_SUPPORT;QT_NO_DEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_OPENGL_LIB;QT_NETWORK_LIB;QT_DLL"
RuntimeLibrary="2"
FloatingPointModel="2"
@@ -70,7 +70,7 @@ />
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="opengl32.lib qtmain.lib QtCore4.lib QtGui4.lib QtOpenGL4.lib QtNetwork4.lib Strmiids.lib Ws2_32.lib QBezierConfigurator.lib"
+ AdditionalDependencies="opengl32.lib qtmain.lib QtCore4.lib QtGui4.lib QtOpenGL4.lib QtNetwork4.lib Strmiids.lib Ws2_32.lib QBezierConfigurator.lib QFunctionConfigurator.lib"
OutputFile="$(OutDir)\$(ProjectName).exe"
AdditionalLibraryDirectories=""
GenerateManifest="true"
@@ -238,7 +238,7 @@ <Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." -I"C:\Project\FaceTrackNoIR\VS2005\QBezierConfigurator\QBezierConfigurator\." ".\ExcelServer.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." ".\ExcelServer.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
@@ -264,7 +264,7 @@ <Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." -I"C:\Project\FaceTrackNoIR\VS2005\QBezierConfigurator\QBezierConfigurator\." ".\FaceApp.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." ".\FaceApp.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
@@ -290,7 +290,7 @@ <Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." -I"C:\Project\FaceTrackNoIR\VS2005\QBezierConfigurator\QBezierConfigurator\." ".\FaceTrackNoIR.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." ".\FaceTrackNoIR.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
@@ -316,7 +316,7 @@ <Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." -I"C:\Project\FaceTrackNoIR\VS2005\QBezierConfigurator\QBezierConfigurator\." ".\FTNoIR_cxx_protocolserver.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." ".\FTNoIR_cxx_protocolserver.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
@@ -342,7 +342,7 @@ <Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." -I"C:\Project\FaceTrackNoIR\VS2005\QBezierConfigurator\QBezierConfigurator\." "..\FTNoIR_PoseWidget\glwidget.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." "..\FTNoIR_PoseWidget\glwidget.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
@@ -372,7 +372,7 @@ <Tool
Name="VCCustomBuildTool"
Description="Moc'ing $(InputFileName)..."
- CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." -I"C:\Project\FaceTrackNoIR\VS2005\QBezierConfigurator\QBezierConfigurator\." ".\tracker.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
+ CommandLine=""$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_NETWORK_LIB -DQT_DLL -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtNetwork\." -I"$(QTDIR)\include\QtGui\." -I"$(QTDIR)\include\QtOpenGL\." -I"$(QTDIR)\include\QtWebKit\." -I"$(QTDIR)\include\QtTest\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\." -I"$(SolutionDir)\FTNoIR_Tracker_UDP\GeneratedFiles\." -I"$(SolutionDir)\FTNoIR_Filter_EWMA2\." -I"C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Include\." ".\tracker.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
"
AdditionalDependencies=""$(QTDIR)\bin\moc.exe";$(InputPath)"
Outputs="".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp""
/>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.vcproj.VRIEND200810.Wim.user b/FaceTrackNoIR/FaceTrackNoIR.vcproj.VRIEND200810.Wim.user deleted file mode 100644 index aaaa8518..00000000 --- a/FaceTrackNoIR/FaceTrackNoIR.vcproj.VRIEND200810.Wim.user +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
- ProjectType="Visual C++"
- Version="8.00"
- ShowAllFiles="false"
- >
- <Configurations>
- <Configuration
- Name="Release|Win32"
- >
- <DebugSettings
- Command="$(TargetPath)"
- WorkingDirectory=""
- CommandArguments=""
- Attach="false"
- DebuggerType="3"
- Remote="1"
- RemoteMachine="VRIEND200810"
- RemoteCommand=""
- HttpUrl=""
- PDBPath=""
- SQLDebugging=""
- Environment="PATH=$(QTDIR)\bin;$(PATH)"
- EnvironmentMerge="true"
- DebuggerFlavor=""
- MPIRunCommand=""
- MPIRunArguments=""
- MPIRunWorkingDirectory=""
- ApplicationCommand=""
- ApplicationArguments=""
- ShimCommand=""
- MPIAcceptMode=""
- MPIAcceptFilter=""
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- >
- <DebugSettings
- Command="$(TargetPath)"
- WorkingDirectory=""
- CommandArguments=""
- Attach="false"
- DebuggerType="3"
- Remote="1"
- RemoteMachine="VRIEND200810"
- RemoteCommand=""
- HttpUrl=""
- PDBPath=""
- SQLDebugging=""
- Environment="PATH=$(QTDIR)\bin;$(PATH)"
- EnvironmentMerge="true"
- DebuggerFlavor=""
- MPIRunCommand=""
- MPIRunArguments=""
- MPIRunWorkingDirectory=""
- ApplicationCommand=""
- ApplicationArguments=""
- ShimCommand=""
- MPIAcceptMode=""
- MPIAcceptFilter=""
- />
- </Configuration>
- </Configurations>
-</VisualStudioUserFile>
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp index 49417733..2d4c5917 100644 --- a/FaceTrackNoIR/tracker.cpp +++ b/FaceTrackNoIR/tracker.cpp @@ -91,12 +91,12 @@ T6DOF Tracker::target_camera(0,0,0,0,0,0); T6DOF Tracker::new_camera(0,0,0,0,0,0);
T6DOF Tracker::output_camera(0,0,0,0,0,0); // Position sent to game protocol
-THeadPoseDOF Tracker::Pitch; // One structure for each of 6DOF's
-THeadPoseDOF Tracker::Yaw;
-THeadPoseDOF Tracker::Roll;
-THeadPoseDOF Tracker::X;
-THeadPoseDOF Tracker::Y;
-THeadPoseDOF Tracker::Z;
+THeadPoseDOF Tracker::Pitch("PitchUp", "PitchDown"); // One structure for each of 6DOF's
+THeadPoseDOF Tracker::Yaw("Yaw", "");
+THeadPoseDOF Tracker::Roll("Roll", "");
+THeadPoseDOF Tracker::X("X","");
+THeadPoseDOF Tracker::Y("Y","");
+THeadPoseDOF Tracker::Z("Z","");
TShortKey Tracker::CenterKey; // ShortKey to Center headposition
TShortKey Tracker::StartStopKey; // ShortKey to Start/stop tracking
@@ -234,6 +234,12 @@ Tracker::~Tracker() { ::WaitForSingleObject(m_WaitThread, INFINITE);
}
+ //
+ // Remove the Tracker
+ // 20120615, WVR: As suggested by Stanislaw
+ if (pTracker)
+ pTracker.Release();
+
// Close handles
::CloseHandle(m_StopThread);
::CloseHandle(m_WaitThread);
@@ -516,12 +522,23 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); new_camera.position.yaw = getSmoothFromList( &Yaw.rawList ) - Yaw.offset_headPos;
new_camera.position.roll = getSmoothFromList( &Roll.rawList ) - Roll.offset_headPos;
}
- output_camera.position.x = X.invert * getOutputFromCurve(&X.curve, new_camera.position.x, X.NeutralZone, X.MaxInput);
- output_camera.position.y = Y.invert * getOutputFromCurve(&Y.curve, new_camera.position.y, Y.NeutralZone, Y.MaxInput);
- output_camera.position.z = Z.invert * getOutputFromCurve(&Z.curve, new_camera.position.z, Z.NeutralZone, Z.MaxInput);
- output_camera.position.pitch = Pitch.invert * getOutputFromCurve(&Pitch.curve, new_camera.position.pitch, Pitch.NeutralZone, Pitch.MaxInput);
- output_camera.position.yaw = Yaw.invert * getOutputFromCurve(&Yaw.curve, new_camera.position.yaw, Yaw.NeutralZone, Yaw.MaxInput);
- output_camera.position.roll = Roll.invert * getOutputFromCurve(&Roll.curve, new_camera.position.roll, Roll.NeutralZone, Roll.MaxInput);
+ output_camera.position.x = X.invert * X.curvePtr->getValue(new_camera.position.x);
+ output_camera.position.y = Y.invert * Y.curvePtr->getValue(new_camera.position.y);
+ output_camera.position.z = Z.invert * Z.curvePtr->getValue(new_camera.position.z);
+ int altp = new_camera.position.pitch < 0;
+ output_camera.position.pitch = Pitch.invert * (altp ? Pitch.curvePtrAlt : Pitch.curvePtr)->getValue(new_camera.position.pitch);
+ ///output_camera.position.pitch = Pitch.invert * Pitch.curvePtr->getValue(new_camera.position.pitch);
+ output_camera.position.yaw = Yaw.invert * Yaw.curvePtr->getValue(new_camera.position.yaw);
+ output_camera.position.roll = Roll.invert * Roll.curvePtr->getValue(new_camera.position.roll);
+
+
+ X.curvePtr->setTrackingActive( true );
+ Y.curvePtr->setTrackingActive( true );
+ Z.curvePtr->setTrackingActive( true );
+ Yaw.curvePtr->setTrackingActive( true );
+ Pitch.curvePtr->setTrackingActive( true );
+ Pitch.curvePtrAlt->setTrackingActive( true );
+ Roll.curvePtr->setTrackingActive( true );
//
// Reverse Axis.
@@ -583,6 +600,13 @@ T6DOF gameoutput_camera(0,0,0,0,0,0); gameoutput_camera = output_camera + gamezero_camera;
pProtocol->sendHeadposeToGame( &gameoutput_camera ); // degrees & centimeters
}
+ X.curvePtr->setTrackingActive( false );
+ Y.curvePtr->setTrackingActive( false );
+ Z.curvePtr->setTrackingActive( false );
+ Yaw.curvePtr->setTrackingActive( false );
+ Pitch.curvePtr->setTrackingActive( false );
+ Pitch.curvePtrAlt->setTrackingActive( false );
+ Roll.curvePtr->setTrackingActive( false );
}
}
@@ -732,111 +756,12 @@ float sum = 0; }
//
-// Correct the Raw value, with the Neutral Zone supplied
-//
-//float Tracker::getCorrectedNewRaw ( float NewRaw, float rotNeutral ) {
-//
-// //
-// // Return 0, if NewRaw is within the Neutral Zone
-// //
-// if ( fabs( NewRaw ) < rotNeutral ) {
-// return 0.0f;
-// }
-//
-// //
-// // NewRaw is outside the zone.
-// // Substract rotNeutral from the NewRaw
-// //
-// if ( NewRaw > 0.0f ) {
-// return (NewRaw - rotNeutral);
-// }
-// else {
-// return (NewRaw + rotNeutral); // Makes sense?
-// }
-//
-//}
-
-//
-// Implementation of an Exponentially Weighted Moving Average, used to serve as a low-pass filter.
-// The code was adopted from Melchior Franz, who created it for FlightGear (aircraft.nas).
-//
-// The function takes the new value, the delta-time (sec) and a weighing coefficient (>0 and <1)
-// All previous values are taken into account, the weight of this is determined by 'coeff'.
-//
-//float Tracker::lowPassFilter ( float newvalue, float *oldvalue, float dt, float coeff) {
-//float c = 0.0f;
-//float fil = 0.0f;
-//
-// c = dt / (coeff + dt);
-// fil = (newvalue * c) + (*oldvalue * (1 - c));
-// *oldvalue = fil;
-//
-// return fil;
-//}
-
-//
-// Implementation of a Rate Limiter, used to eliminate spikes in the raw data.
-//
-// The function takes the new value, the delta-time (sec) and the positive max. slew-rate (engineering units/sec)
-//
-//float Tracker::rateLimiter ( float newvalue, float *oldvalue, float dt, float max_rate) {
-//float rate = 0.0f;
-//float clamped_value = 0.0f;
-//
-// rate = (newvalue - *oldvalue) / dt;
-// clamped_value = newvalue; // If all is well, the newvalue is returned
-//
-// //
-// // One max-rate is used for ramp-up and ramp-down
-// // If the rate exceeds max_rate, return the maximum value that the max_rate allows
-// //
-// if (fabs(rate) > max_rate) {
-// //
-// // For ramp-down, apply a factor -1 to the max_rate
-// //
-// if (rate < 0.0f) {
-// clamped_value = (-1.0f * dt * max_rate) + *oldvalue;
-// }
-// else {
-// clamped_value = (dt * max_rate) + *oldvalue;
-// }
-// }
-// *oldvalue = clamped_value;
-//
-// return clamped_value;
-//}
-
-//
-// Get the output from the curve.
-//
-float Tracker::getOutputFromCurve ( QPainterPath *curve, float input, float neutralzone, float maxinput ) {
-float sign;
-
- sign = 1.0f;
- if (input < 0.0f) {
- sign = -1.0f;
- }
-
- //
- // Always return 0 inside the NeutralZone
- // Always return max. when input larger than expected
- //
- if (fabs(input) > maxinput) return sign * curve->pointAtPercent(1.0).x();
-
- //
- // Return the value, derived from the Bezier-curve
- //
- return sign * curve->pointAtPercent((fabs(input))/maxinput).x();
-}
-
-//
// Load the current Settings from the currently 'active' INI-file.
//
void Tracker::loadSettings() {
int NeutralZone;
int sensYaw, sensPitch, sensRoll;
int sensX, sensY, sensZ;
-QPointF point1, point2, point3, point4;
qDebug() << "Tracker::loadSettings says: Starting ";
QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
@@ -860,83 +785,6 @@ QPointF point1, point2, point3, point4; iniFile.endGroup ();
//
- // Read the curve-settings from the file. Use the (deprecated) settings, if the curves are not there.
- //
- iniFile.beginGroup ( "Curves" );
-
- //
- // Create a new path and assign it to the curve.
- //
- getCurvePoints( &iniFile, "Yaw_", &point1, &point2, &point3, &point4, NeutralZone, sensYaw, 50, 180 );
- QPainterPath newYawCurve;
- newYawCurve.moveTo( QPointF(0,0) );
- newYawCurve.lineTo( point1 );
- newYawCurve.cubicTo(point2, point3, point4);
-
- Yaw.NeutralZone = point1.y(); // Get the Neutral Zone
- Yaw.MaxInput = point4.y(); // Get Maximum Input
- Yaw.curve = newYawCurve;
-
- qDebug() << "loadSettings says: curve-elementcount = " << Yaw.curve.elementCount();
-
- // Pitch
- getCurvePoints( &iniFile, "Pitch_", &point1, &point2, &point3, &point4, NeutralZone, sensPitch, 50, 180 );
- QPainterPath newPitchCurve;
- newPitchCurve.moveTo( QPointF(0,0) );
- newPitchCurve.lineTo( point1 );
- newPitchCurve.cubicTo(point2, point3, point4);
-
- Pitch.NeutralZone = point1.y(); // Get the Neutral Zone
- Pitch.MaxInput = point4.y(); // Get Maximum Input
- Pitch.curve = newPitchCurve;
-
- // Roll
- getCurvePoints( &iniFile, "Roll_", &point1, &point2, &point3, &point4, NeutralZone, sensRoll, 50, 180 );
- QPainterPath newRollCurve;
- newRollCurve.moveTo( QPointF(0,0) );
- newRollCurve.lineTo( point1 );
- newRollCurve.cubicTo(point2, point3, point4);
-
- Roll.NeutralZone = point1.y(); // Get the Neutral Zone
- Roll.MaxInput = point4.y(); // Get Maximum Input
- Roll.curve = newRollCurve;
-
- // X
- getCurvePoints( &iniFile, "X_", &point1, &point2, &point3, &point4, NeutralZone, sensX, 50, 180 );
- QPainterPath newXCurve;
- newXCurve.moveTo( QPointF(0,0) );
- newXCurve.lineTo( point1 );
- newXCurve.cubicTo(point2, point3, point4);
-
- X.NeutralZone = point1.y(); // Get the Neutral Zone
- X.MaxInput = point4.y(); // Get Maximum Input
- X.curve = newXCurve;
-
- // Y
- getCurvePoints( &iniFile, "Y_", &point1, &point2, &point3, &point4, NeutralZone, sensY, 50, 180 );
- QPainterPath newYCurve;
- newYCurve.moveTo( QPointF(0,0) );
- newYCurve.lineTo( point1 );
- newYCurve.cubicTo(point2, point3, point4);
-
- Y.NeutralZone = point1.y(); // Get the Neutral Zone
- Y.MaxInput = point4.y(); // Get Maximum Input
- Y.curve = newYCurve;
-
- // Z
- getCurvePoints( &iniFile, "Z_", &point1, &point2, &point3, &point4, NeutralZone, sensZ, 50, 180 );
- QPainterPath newZCurve;
- newZCurve.moveTo( QPointF(0,0) );
- newZCurve.lineTo( point1 );
- newZCurve.cubicTo(point2, point3, point4);
-
- Z.NeutralZone = point1.y(); // Get the Neutral Zone
- Z.MaxInput = point4.y(); // Get Maximum Input
- Z.curve = newZCurve;
-
- iniFile.endGroup ();
-
- //
// Read the keyboard shortcuts.
//
iniFile.beginGroup ( "KB_Shortcuts" );
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h index a69218a1..c1eb61c6 100644 --- a/FaceTrackNoIR/tracker.h +++ b/FaceTrackNoIR/tracker.h @@ -3,8 +3,8 @@ * gamers from Holland, who don't like to pay much for *
* head-tracking. *
* *
-* Copyright (C) 2010 Wim Vriend (Developing) *
-* Ron Hendriks (Researching and Testing) *
+* Copyright (C) 2010 - 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
* *
* Homepage * *
* This program is free software; you can redistribute it and/or modify it *
@@ -20,6 +20,10 @@ * You should have received a copy of the GNU General Public License along *
* with this program; if not, see <http://www.gnu.org/licenses/>. *
*********************************************************************************/
+/*
+ Modifications (last one on top):
+ 20120717 - WVR: FunctionConfig is now used for the Curves, instead of BezierConfig.
+*/
#ifndef __TRACKER_H__
#define __TRACKER_H__
@@ -37,6 +41,7 @@ #include "ExcelServer.h" // Excel-server (for analysing purposes)
#include "FTNoIR_cxx_protocolserver.h"
+#include "FunctionConfig.h"
#include "..\ftnoir_tracker_base\FTNoIR_Tracker_base.h"
#include "..\ftnoir_protocol_base\FTNoIR_Protocol_base.h"
@@ -94,6 +99,20 @@ class FaceTrackNoIR; // pre-define parent-class to avoid circular includes //
class THeadPoseDOF {
public:
+
+ THeadPoseDOF(QString primary, QString secondary = "") {
+ QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // 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)
+
+ curvePtr = new FunctionConfig(primary); // Create the Function-config for input-output translation
+ curvePtr->loadSettings(iniFile); // Load the settings from the INI-file
+ if (secondary != "") {
+ curvePtrAlt = new FunctionConfig(secondary);
+ curvePtrAlt->loadSettings(iniFile);
+ }
+ }
+
void initHeadPoseData(){
headPos = 0.0f;
offset_headPos = 0.0f;
@@ -116,7 +135,11 @@ public: int maxItems; // Maximum number of elements in rawList
float prevPos; // Previous Position
float prevRawPos; // Previous Raw Position
- QPainterPath curve; // Bezier curve to translate input -> output
+// QPainterPath curve; // Bezier curve to translate input -> output
+
+ FunctionConfig* curvePtr; // Function to translate input -> output
+ FunctionConfig* curvePtrAlt;
+
int NeutralZone; // Neutral zone
int MaxInput; // Maximum raw input
float confidence; // Current confidence
@@ -162,14 +185,6 @@ private: static void addHeadPose( THeadPoseData head_pose );
static void addRaw2List ( QList<float> *rawList, float maxIndex, float raw );
- /** static member variables for saving the head pose **/
- static THeadPoseDOF Pitch; // Head-rotation X-direction (Up/Down)
- static THeadPoseDOF Yaw; // Head-rotation Y-direction ()
- static THeadPoseDOF Roll; // Head-rotation Z-direction ()
- static THeadPoseDOF X; // Head-movement X-direction (Left/Right)
- static THeadPoseDOF Y; // Head-movement Y-direction (Up/Down)
- static THeadPoseDOF Z; // Head-movement Z-direction (To/From camera)
-
static TShortKey CenterKey; // ShortKey to Center headposition
static TShortKey StartStopKey; // ShortKey to Start/stop tracking
static TShortKey InhibitKey; // ShortKey to disable one or more axis during tracking
@@ -207,6 +222,14 @@ public: Tracker( FaceTrackNoIR *parent );
~Tracker();
+ /** static member variables for saving the head pose **/
+ static THeadPoseDOF Pitch; // Head-rotation X-direction (Up/Down)
+ static THeadPoseDOF Yaw; // Head-rotation Y-direction ()
+ static THeadPoseDOF Roll; // Head-rotation Z-direction ()
+ static THeadPoseDOF X; // Head-movement X-direction (Left/Right)
+ static THeadPoseDOF Y; // Head-movement Y-direction (Up/Down)
+ static THeadPoseDOF Z; // Head-movement Z-direction (To/From camera)
+
void setup();
// void registerHeadPoseCallback();
@@ -240,7 +263,7 @@ public: static float getSmoothFromList ( QList<float> *rawList );
static float getDegreesFromRads ( float rads ) { return (rads * 57.295781f); }
static float getRadsFromDegrees ( float degrees ) { return (degrees * 0.017453f); }
- static float getOutputFromCurve ( QPainterPath *curve, float input, float neutralzone, float maxinput );
+// static float getOutputFromCurve ( QPainterPath *curve, float input, float neutralzone, float maxinput );
// For now, use one slider for all
void setSmoothing(int x) {
diff --git a/bin/FunctionConfig.h b/bin/FunctionConfig.h Binary files differnew file mode 100644 index 00000000..9777d887 --- /dev/null +++ b/bin/FunctionConfig.h diff --git a/bin/QBezierConfigurator.dll b/bin/QBezierConfigurator.dll Binary files differdeleted file mode 100644 index a550b132..00000000 --- a/bin/QBezierConfigurator.dll +++ /dev/null diff --git a/bin/QBezierConfigurator.lib b/bin/QBezierConfigurator.lib Binary files differdeleted file mode 100644 index df3cc4e9..00000000 --- a/bin/QBezierConfigurator.lib +++ /dev/null diff --git a/bin/QFunctionConfigurator.lib b/bin/QFunctionConfigurator.lib Binary files differnew file mode 100644 index 00000000..05f4afa1 --- /dev/null +++ b/bin/QFunctionConfigurator.lib diff --git a/bin/Settings/ArmA.ini b/bin/Settings/ArmA.ini index e7ef044c..7777dbfc 100644 --- a/bin/Settings/ArmA.ini +++ b/bin/Settings/ArmA.ini @@ -33,12 +33,12 @@ Roll_point2=@Variant(\0\0\0\x1a@R\xc0\0\0\0\0\0@A\x80\0\0\0\0\0) Roll_point3=@Variant(\0\0\0\x1a@e`\0\0\0\0\0@G\0\0\0\0\0\0)
Roll_point4=@Variant(\0\0\0\x1a@e`\0\0\0\0\0@I\0\0\0\0\0\0)
Yaw_point1=@Variant(\0\0\0\x1a@ \0\0\0\0\0\0@&\0\0\0\0\0\0)
-Yaw_point2=@Variant(\0\0\0\x1a@@@\0\0\0\0\0@:\x80\0\0\0\0\0)
+Yaw_point2="@Variant(\0\0\0\x1a@@\x80\0\0\0\0\0@;\0\0\0\0\0\0)"
Yaw_point3=@Variant(\0\0\0\x1a@L\x80\0\0\0\0\0@C\0\0\0\0\0\0)
Yaw_point4=@Variant(\0\0\0\x1a@U\0\0\0\0\0\0@I\0\0\0\0\0\0)
Pitch_point1=@Variant(\0\0\0\x1a@\x1c\0\0\0\0\0\0@ \0\0\0\0\0\0)
-Pitch_point2=@Variant(\0\0\0\x1a@C\xc0\0\0\0\0\0@>\x80\0\0\0\0\0)
-Pitch_point3=@Variant(\0\0\0\x1a@P \0\0\0\0\0@D\x80\0\0\0\0\0)
+Pitch_point2=@Variant(\0\0\0\x1a@D\0\0\0\0\0\0@?\0\0\0\0\0\0)
+Pitch_point3=@Variant(\0\0\0\x1a@P@\0\0\0\0\0@D\x80\0\0\0\0\0)
Pitch_point4=@Variant(\0\0\0\x1a@T\x80\0\0\0\0\0@I\0\0\0\0\0\0)
X_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0@\0\0\0\0\0\0\0)
X_point2=@Variant(\0\0\0\x1a@Z@\0\0\0\0\0@1\0\0\0\0\0\0)
@@ -49,9 +49,15 @@ Y_point2=@Variant(\0\0\0\x1a@F\x80\0\0\0\0\0@E\0\0\0\0\0\0) Y_point3=@Variant(\0\0\0\x1a@6\0\0\0\0\0\0@9\0\0\0\0\0\0)
Y_point4=@Variant(\0\0\0\x1a@P@\0\0\0\0\0@I\0\0\0\0\0\0)
Z_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0@&\0\0\0\0\0\0)
-Z_point2=@Variant(\0\0\0\x1a@1\0\0\0\0\0\0@H@\0\0\0\0\0)
+Z_point2=@Variant(\0\0\0\x1a@1\0\0\0\0\0\0@H\x80\0\0\0\0\0)
Z_point3=@Variant(\0\0\0\x1a@6\0\0\0\0\0\0@D\x80\0\0\0\0\0)
Z_point4=@Variant(\0\0\0\x1a@K\x80\0\0\0\0\0@I\0\0\0\0\0\0)
+fixup_mx=0
+fixup_my=0
+fixup_mz=0
+fixup_x=0
+fixup_y=0
+fixup_z=0
[KB_Shortcuts]
Keycode_Center=199
@@ -78,10 +84,64 @@ Keycode_GameZero=0 Shift_GameZero=false
Ctrl_GameZero=false
Alt_GameZero=false
-Enable_ReverseAxis=true
+Enable_ReverseAxis=false
RA_Yaw=40
RA_ZPos=0
RA_ToZPos=100
[TrackerSource]
-Selection=0
+Selection=2
+
+[Curves-Yaw]
+point-count=1
+point-0-x=44.7297297297297
+point-0-y=134.357142857143
+
+[Curves-PitchUp]
+point-count=1
+point-0-x=45.2702702702703
+point-0-y=169.714285714286
+point-1-x=22.1621621621622
+point-1-y=164.571428571429
+point-2-x=32.027027027027
+point-2-y=118.285714285714
+point-3-x=37.8378378378378
+point-3-y=150.428571428571
+
+[Curves-PitchDown]
+point-count=1
+point-0-x=47.2972972972973
+point-0-y=169.714285714286
+point-1-x=24.4594594594595
+point-1-y=70.7142857142857
+point-2-x=25.1351351351351
+point-2-y=137.571428571429
+
+[Curves-Roll]
+point-count=1
+point-0-x=37.7027027027027
+point-0-y=135
+
+[Curves-X]
+point-count=1
+point-0-x=37.4324324324324
+point-0-y=83.5714285714286
+
+[Curves-Y]
+point-count=1
+point-0-x=34.1891891891892
+point-0-y=82.9285714285714
+
+[Curves-Z]
+point-count=1
+point-0-x=34.3243243243243
+point-0-y=75.2142857142857
+
+[FTIR]
+useTIRViews=false
+useDummyExe=true
+
+[FaceDetectTracker]
+RedetectMs=500
+CameraId=0
+VideoWidget=1
diff --git a/bin/Settings/FreeFalcon.ini b/bin/Settings/FreeFalcon.ini index 5b486b11..928a74ce 100644 --- a/bin/Settings/FreeFalcon.ini +++ b/bin/Settings/FreeFalcon.ini @@ -79,3 +79,7 @@ Enable_ReverseAxis=false RA_Yaw=40
RA_ZPos=-20
RA_ToZPos=50
+
+[FTIR]
+useTIRViews=true
+useDummyExe=true
diff --git a/bin/qbezierconfigurator.h b/bin/qbezierconfigurator.h deleted file mode 100644 index 81ce013a..00000000 --- a/bin/qbezierconfigurator.h +++ /dev/null @@ -1,130 +0,0 @@ -#ifndef QBEZIERCONFIGURATOR_H
-#define QBEZIERCONFIGURATOR_H
-
-#include <QtGui>
-#include <QtDesigner/QDesignerExportWidget>
-#include <QPointF>
-
-class QDESIGNER_WIDGET_EXPORT QBezierConfigurator : public QWidget
-{
- Q_OBJECT
- Q_PROPERTY(int maxInputEGU READ maxInputEGU WRITE setmaxInputEGU);
- Q_PROPERTY(int maxOutputEGU READ maxOutputEGU WRITE setmaxOutputEGU);
- Q_PROPERTY(int pixPerEGU READ pixPerEGU WRITE setpixPerEGU);
-
- Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier);
- Q_PROPERTY(QColor colorBackground READ colorBackground WRITE setColorBackground);
- Q_PROPERTY(QString stringInputEGU READ stringInputEGU WRITE setInputEGU);
- Q_PROPERTY(QString stringOutputEGU READ stringOutputEGU WRITE setOutputEGU);
- Q_PROPERTY(QString stringCaption READ stringCaption WRITE setCaption);
-
- // Return the current value to Designer
- int maxInputEGU() const
- {
- return MaxInput;
- }
- int maxOutputEGU() const
- {
- return MaxOutput;
- }
- int pixPerEGU() const
- {
- return pPerEGU;
- }
-
- // Return the current color to Designer
- QColor colorBezier() const
- {
- return colBezier;
- }
- // Return the current color to Designer
- QColor colorBackground() const
- {
- return colBackground;
- }
- // Return the current string to Designer
- QString stringInputEGU() const
- {
- return strInputEGU;
- }
- // Return the current string to Designer
- QString stringOutputEGU() const
- {
- return strOutputEGU;
- }
- // Return the current string to Designer
- QString stringCaption() const
- {
- return strCaption;
- }
-
-public:
- QBezierConfigurator(QWidget *parent = 0);
- ~QBezierConfigurator();
-
-signals:
- void valueNeutralZoneChanged(int);
- void BezierCurveChanged(bool);
-
-public slots:
- void setmaxInputEGU(int);
- void setmaxOutputEGU(int);
- void setpixPerEGU(int);
-
- QPointF getPointOne();
- QPointF getPointTwo();
- QPointF getPointThree();
- QPointF getPointFour();
-
- void setPointOne(QPointF);
- void setPointTwo(QPointF);
- void setPointThree(QPointF);
- void setPointFour(QPointF);
-
- void setNeutralZone(int zone);
-
- void setColorBezier(QColor);
- void setColorBackground(QColor);
- void setInputEGU(QString);
- void setOutputEGU(QString);
- void setCaption(QString);
-
-protected slots:
- void paintEvent(QPaintEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
-
-protected:
- void drawBackground(QPainter *painter, const QRectF &rect);
- void drawPoint(QPainter *painter, const QPointF &pt);
- void drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen);
- bool markContains(const QPointF &pt, const QPointF &coord) const;
- bool withinRange( const QPointF &coord ) const;
-
-protected:
- virtual void resizeEvent(QResizeEvent *);
-
-private:
- QRectF range; // The actual rectangle for the Bezier-curve
- QPointF one, two, three, four; // The four points, that define the curve
- QPointF normalizePoint (QPointF point) const; // Convert the graphical Point to a real-life Point
- QPointF graphicalizePoint (QPointF point) const; // Convert the Point to a graphical Point
-
- QPointF mouseStart;
- QPointF *moving;
- int movingPoint;
-
- int MaxInput; // Maximum input limit
- int MaxOutput; // Maximum output limit
- int pPerEGU; // Number of pixels, per EGU
-
- QColor colBezier; // Color of Bezier curve
- QColor colBackground; // Color of widget background
- QString strInputEGU; // Engineering Units input (vertical axis)
- QString strOutputEGU; // Engineering Units output (horizontal axis)
- QString strCaption; // Caption of the graph
-
-};
-
-#endif // QBEZIERCONFIGURATOR_H
diff --git a/bin/qfunctionconfigurator.h b/bin/qfunctionconfigurator.h new file mode 100644 index 00000000..c2a2f25b --- /dev/null +++ b/bin/qfunctionconfigurator.h @@ -0,0 +1,177 @@ +/********************************************************************************
+* 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/>. *
+* *
+* The FunctionConfigurator was made by Stanislaw Halik, and adapted to *
+* FaceTrackNoIR. *
+* *
+* All credits for this nice piece of code should go to Stanislaw. *
+* *
+* Copyright (c) 2011-2012, Stanislaw Halik <sthalik@misaki.pl> *
+* Permission to use, copy, modify, and/or distribute this *
+* software for any purpose with or without fee is hereby granted, *
+* provided that the above copyright notice and this permission *
+* notice appear in all copies. *
+********************************************************************************/
+#ifndef QFUNCTIONCONFIGURATOR_H
+#define QFUNCTIONCONFIGURATOR_H
+
+#include <QtGui>
+#include <QtDesigner/QDesignerExportWidget>
+#include <QPointF>
+#include "FunctionConfig.h"
+
+//
+// The FunctionConfigurator Widget is used to display and configure a function (curve).
+// The Function is used by FaceTrackNoIR to 'translate' the actual head-pose to the virtual headpose. Every axis is configured by a separate Function.
+//
+// The Function is coded in a separate Class and can exists, without the Widget. When the widget is displayed (therefore 'created'), the Function can be attached to the
+// Widget and the Widget used to change the Function.
+//
+class QDESIGNER_WIDGET_EXPORT QFunctionConfigurator : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(int maxInputEGU READ maxInputEGU WRITE setmaxInputEGU);
+ Q_PROPERTY(int maxOutputEGU READ maxOutputEGU WRITE setmaxOutputEGU);
+ Q_PROPERTY(int pixPerEGU_Input READ pixPerEGU_Input WRITE setpixPerEGU_Input);
+
+ Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier);
+ Q_PROPERTY(QColor colorBackground READ colorBackground WRITE setColorBackground);
+ Q_PROPERTY(QString stringInputEGU READ stringInputEGU WRITE setInputEGU);
+ Q_PROPERTY(QString stringOutputEGU READ stringOutputEGU WRITE setOutputEGU);
+ Q_PROPERTY(QString stringCaption READ stringCaption WRITE setCaption);
+
+ // Return the current value to Designer
+ int maxInputEGU() const
+ {
+ return MaxInput;
+ }
+ int maxOutputEGU() const
+ {
+ return MaxOutput;
+ }
+ int pixPerEGU_Input() const
+ {
+ return pPerEGU_Input;
+ }
+ int pixPerEGU_Output() const
+ {
+ return pPerEGU_Output;
+ }
+
+ // Return the current color to Designer
+ QColor colorBezier() const
+ {
+ return colBezier;
+ }
+ // Return the current color to Designer
+ QColor colorBackground() const
+ {
+ return colBackground;
+ }
+ // Return the current string to Designer
+ QString stringInputEGU() const
+ {
+ return strInputEGU;
+ }
+ // Return the current string to Designer
+ QString stringOutputEGU() const
+ {
+ return strOutputEGU;
+ }
+ // Return the current string to Designer
+ QString stringCaption() const
+ {
+ return strCaption;
+ }
+
+public:
+ QFunctionConfigurator(QWidget *parent = 0);
+ ~QFunctionConfigurator();
+ FunctionConfig* config();
+
+ void setConfig(FunctionConfig* config); // Connect the FunctionConfig to the Widget.
+ void loadSettings(QSettings& settings); // Load the FunctionConfig (points) from the INI-file
+ void saveSettings(QSettings& settings); // Save the FunctionConfig (points) to the INI-file
+
+signals:
+ void CurveChanged(bool);
+
+public slots:
+ void setmaxInputEGU(int);
+ void setmaxOutputEGU(int);
+ void setpixPerEGU_Input(int);
+ void setpixPerEGU_Output(int);
+
+ void setColorBezier(QColor);
+ void setColorBackground(QColor);
+ void setInputEGU(QString);
+ void setOutputEGU(QString);
+ void setCaption(QString);
+
+protected slots:
+ void paintEvent(QPaintEvent *e);
+ void mousePressEvent(QMouseEvent *e);
+ void mouseMoveEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
+
+protected:
+ void drawBackground(QPainter *painter, const QRectF &rect);
+ void drawPoint(QPainter *painter, const QPointF &pt, QColor colBG );
+ void drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen);
+ bool markContains(const QPointF &pt, const QPointF &coord) const;
+ bool withinRange( const QPointF &coord ) const;
+
+protected:
+ virtual void resizeEvent(QResizeEvent *);
+
+private:
+ QRectF range; // The actual rectangle for the Bezier-curve
+ QPointF lastPoint; // The right-most point of the Function
+ QPointF normalizePoint (QPointF point) const; // Convert the graphical Point to a real-life Point
+ QPointF graphicalizePoint (QPointF point) const; // Convert the Point to a graphical Point
+
+ QPointF *moving;
+ int movingPoint;
+
+ int MaxInput; // Maximum input limit
+ int MaxOutput; // Maximum output limit
+ int pPerEGU_Input; // Number of pixels, per EGU of Input
+ int pPerEGU_Output; // Number of pixels, per EGU of Output
+
+ QColor colBezier; // Color of Bezier curve
+ QColor colBackground; // Color of widget background
+ QString strInputEGU; // Engineering Units input (vertical axis)
+ QString strOutputEGU; // Engineering Units output (horizontal axis)
+ QString strCaption; // Caption of the graph
+
+ //
+ // Properties of the CurveConfigurator Widget
+ //
+ QString _title; // Title do display in Widget and to load Settings
+ FunctionConfig* _config;
+ QList<QPointF> _points; // Function-points
+ QList<QPointF> _draw_points; // Curve-points needed for drawing
+ HANDLE _mutex;
+};
+
+#endif // QFUNCTIONCONFIGURATOR_H
diff --git a/bin/zlib1.dll b/bin/zlib1.dll Binary files differindex 81704ab9..4eb8adb9 100644 --- a/bin/zlib1.dll +++ b/bin/zlib1.dll diff --git a/faceAPI/FaceAPI2FSX.vcproj b/faceAPI/FaceAPI2FSX.vcproj index 6ce63d45..9437e3d0 100644 --- a/faceAPI/FaceAPI2FSX.vcproj +++ b/faceAPI/FaceAPI2FSX.vcproj @@ -124,7 +124,7 @@ />
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""C:\Program Files (x86)\SeeingMachines\FaceTrackingAPI_NC 3.2\API\include";..\FTNoIR_Tracker_Base"
+ AdditionalIncludeDirectories=""D:\Program Files (x86)\SeeingMachines\FaceTrackingAPI_NC 3.2\API\include";..\FTNoIR_Tracker_Base"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
|