summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--FTNoIR_Filter_Base/ftnoir_filter_base.h12
-rw-r--r--FTNoIR_Filter_EWMA2/FTNoIR_FilterControls.ui633
-rw-r--r--FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h12
-rw-r--r--FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp6
-rw-r--r--FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp6
-rw-r--r--FTNoIR_Protocol_Base/ftnoir_protocol_base.h5
-rw-r--r--FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp4
-rw-r--r--FTNoIR_Protocol_FTIR/FTIRTypes.h5
-rw-r--r--FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp75
-rw-r--r--FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h6
-rw-r--r--FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.h2
-rw-r--r--FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.h1
-rw-r--r--FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.vcproj2
-rw-r--r--FTNoIR_Tracker_Base/ftnoir_tracker_base.h69
-rw-r--r--FTNoIR_Tracker_FD/FTNoIR_FD_Controls.ui152
-rw-r--r--FTNoIR_Tracker_FD/FTNoIR_Tracker_FD.h108
-rw-r--r--FTNoIR_Tracker_FD/FTNoIR_Tracker_FD.vcproj382
-rw-r--r--FTNoIR_Tracker_FD/Tracker.qrc5
-rw-r--r--FTNoIR_Tracker_FD/face-detect.h39
-rw-r--r--FTNoIR_Tracker_FD/ftnoir_tracker_facedetect.cpp251
-rw-r--r--FTNoIR_Tracker_FD/ftnoir_tracker_facedetect_dialog.cpp208
-rw-r--r--FTNoIR_Tracker_FD/images/FaceDetect.icobin0 -> 5430 bytes
-rw-r--r--FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h60
-rw-r--r--FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.vcproj82
-rw-r--r--FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp409
-rw-r--r--FTNoIR_Tracker_SM/images/SeeingMachines.icobin0 -> 37798 bytes
-rw-r--r--FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.h47
-rw-r--r--FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.vcproj4
-rw-r--r--FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp274
-rw-r--r--FaceTrackNoIR.sln8
-rw-r--r--FaceTrackNoIR.suobin449536 -> 520192 bytes
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp249
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.h3
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.qrc1
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.ui20
-rw-r--r--FaceTrackNoIR/tracker.cpp66
-rw-r--r--FaceTrackNoIR/tracker.h17
-rw-r--r--List of compatible games.xlsbin40448 -> 40448 bytes
-rw-r--r--List of compatible webcams.xlsbin32768 -> 32768 bytes
-rw-r--r--bin/QBezierConfigurator.dllbin49152 -> 49152 bytes
-rw-r--r--bin/Settings/ArmA.ini10
-rw-r--r--bin/Settings/FF5.ini12
-rw-r--r--bin/Settings/FreeFalcon.ini22
-rw-r--r--bin/Settings/IL2.ini42
-rw-r--r--bin/Settings/Mouse Look.ini16
-rw-r--r--bin/Settings/SimConnect.ini8
-rw-r--r--bin/UIElements/SetupFaceTrackNoIR.jpgbin9780 -> 21508 bytes
47 files changed, 2211 insertions, 1122 deletions
diff --git a/FTNoIR_Filter_Base/ftnoir_filter_base.h b/FTNoIR_Filter_Base/ftnoir_filter_base.h
index e7dcd6bc..3d617abc 100644
--- a/FTNoIR_Filter_Base/ftnoir_filter_base.h
+++ b/FTNoIR_Filter_Base/ftnoir_filter_base.h
@@ -23,9 +23,9 @@ struct IFilter
virtual void Initialize() = 0;
virtual void FilterHeadPoseData(THeadPoseData *current_camera_position, THeadPoseData *target_camera_position, THeadPoseData *new_camera_position, bool newTarget) = 0;
- virtual void getFilterFullName(QString *strToBeFilled) = 0;
- virtual void getFilterShortName(QString *strToBeFilled) = 0;
- virtual void getFilterDescription(QString *strToBeFilled) = 0;
+ virtual void getFullName(QString *strToBeFilled) = 0;
+ virtual void getShortName(QString *strToBeFilled) = 0;
+ virtual void getDescription(QString *strToBeFilled) = 0;
};
// Handle type. In C++ language the interface type is used.
@@ -59,9 +59,9 @@ struct IFilterDialog
virtual void Release() = 0; // Member required to enable Auto-remove
virtual void Initialize(QWidget *parent, IFilterPtr ptr) = 0;
- virtual void getFilterFullName(QString *strToBeFilled) = 0;
- virtual void getFilterShortName(QString *strToBeFilled) = 0;
- virtual void getFilterDescription(QString *strToBeFilled) = 0;
+ virtual void getFullName(QString *strToBeFilled) = 0;
+ virtual void getShortName(QString *strToBeFilled) = 0;
+ virtual void getDescription(QString *strToBeFilled) = 0;
virtual void getIcon(QIcon *icon) = 0;
};
diff --git a/FTNoIR_Filter_EWMA2/FTNoIR_FilterControls.ui b/FTNoIR_Filter_EWMA2/FTNoIR_FilterControls.ui
index cbd61d53..e9419a73 100644
--- a/FTNoIR_Filter_EWMA2/FTNoIR_FilterControls.ui
+++ b/FTNoIR_Filter_EWMA2/FTNoIR_FilterControls.ui
@@ -6,10 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
- <width>411</width>
- <height>225</height>
+ <width>371</width>
+ <height>380</height>
</rect>
</property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>380</height>
+ </size>
+ </property>
<property name="windowTitle">
<string>EWMA2 Filter settings FaceTrackNoIR</string>
</property>
@@ -28,293 +34,338 @@
</property>
<layout class="QVBoxLayout" name="_vertical_layout">
<item>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="lblInvert1_6">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>Min.</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="lblInvert1_7">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>Max.</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="3" column="0">
+ <widget class="QLabel" name="lblInvert1_7">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Max.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="lblInvert1_8">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Curve</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QSlider" name="minSmooth">
+ <property name="minimumSize">
+ <size>
+ <width>45</width>
+ <height>15</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="pageStep">
+ <number>10</number>
+ </property>
+ <property name="value">
+ <number>2</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::NoTicks</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QSpinBox" name="spinMinSmooth">
+ <property name="minimumSize">
+ <size>
+ <width>40</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="singleStep">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>2</number>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QLabel" name="lblInvert1">
+ <property name="minimumSize">
+ <size>
+ <width>35</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>frames</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSlider" name="maxSmooth">
+ <property name="minimumSize">
+ <size>
+ <width>45</width>
+ <height>15</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="pageStep">
+ <number>10</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::NoTicks</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QSpinBox" name="spinMaxSmooth">
+ <property name="minimumSize">
+ <size>
+ <width>40</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="singleStep">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QLabel" name="lblInvert1_4">
+ <property name="minimumSize">
+ <size>
+ <width>35</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>frames</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QSlider" name="powCurve">
+ <property name="minimumSize">
+ <size>
+ <width>45</width>
+ <height>15</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="pageStep">
+ <number>10</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="tickPosition">
+ <enum>QSlider::NoTicks</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QSpinBox" name="spinPowCurve">
+ <property name="minimumSize">
+ <size>
+ <width>40</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ <property name="singleStep">
+ <number>5</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="3">
+ <widget class="QLabel" name="lblInvert1_5">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>pow</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="lblInvert1_6">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>30</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
+ <property name="text">
+ <string>Min.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="lblInvert1_8">
+ <item>
+ <widget class="QLabel" name="label_4">
<property name="minimumSize">
<size>
<width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>Curve</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QSlider" name="minSmooth">
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>15</height>
- </size>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="pageStep">
- <number>10</number>
- </property>
- <property name="value">
- <number>2</number>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="tickPosition">
- <enum>QSlider::NoTicks</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QSpinBox" name="spinMinSmooth">
- <property name="minimumSize">
- <size>
- <width>40</width>
- <height>22</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="singleStep">
- <number>5</number>
- </property>
- <property name="value">
- <number>2</number>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLabel" name="lblInvert1">
- <property name="minimumSize">
- <size>
- <width>35</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>frames</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSlider" name="maxSmooth">
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>15</height>
- </size>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="pageStep">
- <number>10</number>
- </property>
- <property name="value">
- <number>10</number>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="tickPosition">
- <enum>QSlider::NoTicks</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QSpinBox" name="spinMaxSmooth">
- <property name="minimumSize">
- <size>
- <width>40</width>
- <height>22</height>
+ <height>204</height>
</size>
</property>
<property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="singleStep">
- <number>5</number>
- </property>
- <property name="value">
- <number>10</number>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLabel" name="lblInvert1_4">
- <property name="minimumSize">
- <size>
- <width>35</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
+ <string notr="true">background-color: rgb(214, 214, 214);
+border-color: rgb(0, 0, 0);</string>
</property>
- <property name="styleSheet">
- <string notr="true"/>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
</property>
<property name="text">
- <string>frames</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QSlider" name="powCurve">
- <property name="minimumSize">
- <size>
- <width>45</width>
- <height>15</height>
- </size>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="pageStep">
- <number>10</number>
- </property>
- <property name="value">
- <number>10</number>
- </property>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="tickPosition">
- <enum>QSlider::NoTicks</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QSpinBox" name="spinPowCurve">
- <property name="minimumSize">
- <size>
- <width>40</width>
- <height>22</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- <property name="singleStep">
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Min. frames:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to fast movements;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value: slower response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Max. frames:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the way the filter responds to slow movements;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value: slower response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Pow:&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Defines the filters 'readiness' to respond to speed changes;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Higher value = &lt;/span&gt;&lt;span style=&quot; font-size:10pt; font-weight:600;&quot;&gt;higher&lt;/span&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt; response;&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;&quot;&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="margin">
<number>5</number>
</property>
- <property name="value">
- <number>10</number>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLabel" name="lblInvert1_5">
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>30</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>pow</string>
- </property>
</widget>
</item>
</layout>
@@ -333,34 +384,6 @@
</spacer>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>The filter-settings may need some explanation...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>...</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_2">
diff --git a/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h b/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h
index f335eb47..bd90c1f8 100644
--- a/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h
+++ b/FTNoIR_Filter_EWMA2/FTNoIR_Filter_EWMA2.h
@@ -45,9 +45,9 @@ public:
void StartFilter();
void FilterHeadPoseData(THeadPoseData *current_camera_position, THeadPoseData *target_camera_position, THeadPoseData *new_camera_position, bool newTarget);
- void getFilterFullName(QString *strToBeFilled);
- void getFilterShortName(QString *strToBeFilled);
- void getFilterDescription(QString *strToBeFilled);
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
private:
void loadSettings(); // Load the settings from the INI-file
@@ -86,9 +86,9 @@ public:
void Release(); // Member functions which are accessible from outside the DLL
void Initialize(QWidget *parent, IFilterPtr ptr);
- void getFilterFullName(QString *strToBeFilled);
- void getFilterShortName(QString *strToBeFilled);
- void getFilterDescription(QString *strToBeFilled);
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
void getIcon(QIcon *icon);
private:
diff --git a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
index 179db04c..99a4bd98 100644
--- a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
+++ b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2.cpp
@@ -226,19 +226,19 @@ void FTNoIR_Filter::FilterHeadPoseData(THeadPoseData *current_camera_position, T
return;
}
-void FTNoIR_Filter::getFilterFullName(QString *strToBeFilled)
+void FTNoIR_Filter::getFullName(QString *strToBeFilled)
{
*strToBeFilled = filterFullName;
};
-void FTNoIR_Filter::getFilterShortName(QString *strToBeFilled)
+void FTNoIR_Filter::getShortName(QString *strToBeFilled)
{
*strToBeFilled = filterShortName;
};
-void FTNoIR_Filter::getFilterDescription(QString *strToBeFilled)
+void FTNoIR_Filter::getDescription(QString *strToBeFilled)
{
*strToBeFilled = filterDescription;
};
diff --git a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp
index fd24d552..7ffe8bb9 100644
--- a/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp
+++ b/FTNoIR_Filter_EWMA2/ftnoir_filter_ewma2_dialog.cpp
@@ -187,19 +187,19 @@ void FilterControls::save() {
settingsDirty = false;
}
-void FilterControls::getFilterFullName(QString *strToBeFilled)
+void FilterControls::getFullName(QString *strToBeFilled)
{
*strToBeFilled = filterFullName;
};
-void FilterControls::getFilterShortName(QString *strToBeFilled)
+void FilterControls::getShortName(QString *strToBeFilled)
{
*strToBeFilled = filterShortName;
};
-void FilterControls::getFilterDescription(QString *strToBeFilled)
+void FilterControls::getDescription(QString *strToBeFilled)
{
*strToBeFilled = filterDescription;
};
diff --git a/FTNoIR_Protocol_Base/ftnoir_protocol_base.h b/FTNoIR_Protocol_Base/ftnoir_protocol_base.h
index 2dd03b82..c9fbdd1c 100644
--- a/FTNoIR_Protocol_Base/ftnoir_protocol_base.h
+++ b/FTNoIR_Protocol_Base/ftnoir_protocol_base.h
@@ -2,10 +2,13 @@
#define FTNOIR_PROTOCOL_BASE_H
#include "ftnoir_protocol_base_global.h"
-#include "..\ftnoir_tracker_base\ftnoir_tracker_base.h"
+#include "..\ftnoir_tracker_base\ftnoir_tracker_types.h"
#include <QtGui/QWidget>
#include <QtGui/QFrame>
+//#include "winbase.h"
+
#include "windows.h"
+#include "winable.h"
// COM-Like abstract interface.
// This interface doesn't require __declspec(dllexport/dllimport) specifier.
diff --git a/FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp b/FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp
index f799d015..0713f557 100644
--- a/FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp
+++ b/FTNoIR_Protocol_FG/FTNoIR_Protocol_FG.cpp
@@ -34,7 +34,7 @@
#include "ftnoir_protocol_fg.h"
#include <QFile>
-// For Todd
+// For Todd and Arda Kutlu
//#define SEND_ASCII_DATA
//#define LOG_OUTPUT
@@ -122,7 +122,7 @@ char data[100];
//
#ifdef SEND_ASCII_DATA
- sprintf_s(data, "%.2f %.2f %.2f %.2f %.2f %.2f;\n\0", FlightData.x, FlightData.y, FlightData.z, FlightData.p, FlightData.h, FlightData.r);
+ sprintf_s(data, "%.2f %.2f %.2f %.2f %.2f %.2f\n\0", FlightData.x, FlightData.y, FlightData.z, FlightData.p, FlightData.h, FlightData.r);
if (outSocket != 0) {
no_bytes = outSocket->writeDatagram((const char *) &data, strlen( data ), destIP, destPort);
diff --git a/FTNoIR_Protocol_FTIR/FTIRTypes.h b/FTNoIR_Protocol_FTIR/FTIRTypes.h
index f238762c..fcf2d458 100644
--- a/FTNoIR_Protocol_FTIR/FTIRTypes.h
+++ b/FTNoIR_Protocol_FTIR/FTIRTypes.h
@@ -97,6 +97,9 @@ typedef enum tagNPResult
static const char* FTIR_REGISTER_PROGRAMHANDLE = "FT_Register_Program_Handle";
static const char* FTIR_UNREGISTER_PROGRAMHANDLE = "FT_UnRegister_Program_Handle";
+ static const char* FTIR_SIG1 = "precise head tracking\n put your head into the game\n now go look around\n\n Copyright EyeControl Technologies\0\0";
+ static const char* FTIR_SIG2 = "hardware camera\n software processing data\n track user movement\n\n Copyright EyeControl Technologies\0\0";
+
typedef struct tagTrackIRData
{
unsigned short wNPStatus;
@@ -152,7 +155,7 @@ typedef NPRESULT (__stdcall *PF_NOTIFYCALLBACK)( unsigned short, unsigned short
//typedef NPRESULT (__stdcall *PF_NP_REGISTERPROGRAMPROFILEID)( unsigned short );
//typedef NPRESULT (__stdcall *PF_NP_QUERYVERSION)( unsigned short* );
//typedef NPRESULT (__stdcall *PF_NP_REQUESTDATA)( unsigned short );
-//typedef NPRESULT (__stdcall *PF_NP_GETDATA)( LPTRACKIRDATA );
+typedef NPRESULT (__stdcall *PF_NP_GETDATA)( LPTRACKIRDATA );
//typedef NPRESULT (__stdcall *PF_NP_REGISTERNOTIFY)( PF_NOTIFYCALLBACK );
//typedef NPRESULT (__stdcall *PF_NP_UNREGISTERNOTIFY)( void );
//typedef NPRESULT (__stdcall *PF_NP_STARTCURSOR)( void );
diff --git a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp
index 82857745..096b957a 100644
--- a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp
+++ b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.cpp
@@ -133,6 +133,8 @@ float virtRotX;
float virtRotY;
float virtRotZ;
+TRACKIRDATA localdata;
+
//
// Copy the Raw measurements directly to the client.
//
@@ -148,8 +150,31 @@ float virtRotZ;
// Check if the pointer is OK and wait for the Mutex.
// Use the setposition in the (special) DLL, to write the headpose-data.
//
+// qDebug() << "FTIRCreateMapping says: sendHeadpose";
if ( (pMemData != NULL) && (WaitForSingleObject(hFTIRMutex, 100) == WAIT_OBJECT_0) ) {
- setposition (virtPosX, virtPosY, virtPosZ, virtRotZ, virtRotX, virtRotY );
+// qDebug() << "FTIRCreateMapping says: Calling setposition" << setdata;
+
+ //localdata.fNPX = virtPosX;
+ //localdata.fNPY = virtPosY;
+ //localdata.fNPZ = virtPosZ;
+ //localdata.fNPRoll = virtRotZ;
+ //localdata.fNPPitch = virtRotX;
+ //localdata.fNPYaw = virtRotY;
+ //localdata.wPFrameSignature = localdata.wPFrameSignature + 1;
+
+ //setdata(&localdata);
+ //
+// setposition ( virtPosX, virtPosY, virtPosZ, virtRotZ, virtRotX, virtRotY );
+ pMemData->data.fNPX = virtPosX;
+ pMemData->data.fNPY = virtPosY;
+ pMemData->data.fNPZ = virtPosZ;
+ pMemData->data.fNPRoll = virtRotZ;
+ pMemData->data.fNPPitch = virtRotX;
+ pMemData->data.fNPYaw = virtRotY;
+ pMemData->data.wPFrameSignature +=1;
+ if ((pMemData->data.wPFrameSignature < 0) || (pMemData->data.wPFrameSignature > 1000)){
+ pMemData->data.wPFrameSignature = 0;
+ }
ReleaseMutex(hFTIRMutex);
}
}
@@ -185,6 +210,7 @@ bool FTNoIR_Protocol_FTIR::checkServerInstallationOK( HANDLE handle )
//
aFileName = aLocation;
aFileName.append(FTIR_CLIENT_FILENAME);
+// aFileName.append("TIR5.dll");
qDebug() << "FTCheckClientDLL says: Full path of DLL =" << aFileName;
if ( QFile::exists( aFileName ) ) {
@@ -240,16 +266,17 @@ bool FTNoIR_Protocol_FTIR::checkServerInstallationOK( HANDLE handle )
//
// Find the functions in the DLL's
//
- // Get the setposition function from the DLL and use it!
- //
- setposition = (importSetPosition) FTIRClientLib.resolve("SetPosition");
- if (setposition == NULL) {
- qDebug() << "FTIRServer::run() says: SetPosition function not found in DLL!";
- return false;
- }
- else {
- setposition (7.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f);
- }
+ //// Get the setposition function from the DLL and use it!
+ ////
+ ////setposition = (importSetPosition) FTIRClientLib.resolve("SetPosition");
+ ////if (setdata == NULL) {
+ //// qDebug() << "FTIRServer::run() says: SetPosition function not found in DLL!";
+ //// return false;
+ ////}
+ ////else {
+ //// qDebug() << "FTIRCreateMapping says: Calling setposition" << setposition;
+ //// setposition ( 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f );
+ ////}
//
// Load the Start function from TIRViews.dll and call it, to start compatibility with older games
@@ -291,26 +318,32 @@ bool FTNoIR_Protocol_FTIR::FTIRCreateMapping( HANDLE handle )
// If one already exists: close it.
//
hFTIRMemMap = CreateFileMappingA( INVALID_HANDLE_VALUE , 00 , PAGE_READWRITE , 0 ,
- sizeof( TRACKIRDATA ) + sizeof( HANDLE ) + 100,
+ sizeof( FTIRMemMap ),
+// sizeof( TRACKIRDATA ) + sizeof( HANDLE ) + 100,
(LPCSTR) FTIR_MM_DATA );
if ( hFTIRMemMap != 0 ) {
- qDebug() << "FTIRCreateMapping says: FileMapping Created!" << hFTIRMemMap;
- }
-
- if ( ( hFTIRMemMap != 0 ) && ( (long) GetLastError == ERROR_ALREADY_EXISTS ) ) {
- CloseHandle( hFTIRMemMap );
- hFTIRMemMap = 0;
+ if ( (long) GetLastError == ERROR_ALREADY_EXISTS ) {
+ qDebug() << "FTIRCreateMapping says: FileMapping already exists!" << hFTIRMemMap;
+ CloseHandle( hFTIRMemMap );
+ hFTIRMemMap = 0;
+ }
+ else {
+ qDebug() << "FTIRCreateMapping says: FileMapping newly created!" << hFTIRMemMap;
+ }
}
//
- // Create a new FileMapping, Read/Write access
+ // Open the FileMapping, Read/Write access
//
+ pMemData = 0;
hFTIRMemMap = OpenFileMappingA( FILE_MAP_ALL_ACCESS , false , (LPCSTR) FTIR_MM_DATA );
if ( ( hFTIRMemMap != 0 ) ) {
- qDebug() << "FTIRCreateMapping says: FileMapping Created again:" << hFTIRMemMap;
- pMemData = (FTIRMemMap *) MapViewOfFile(hFTIRMemMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(TRACKIRDATA) + sizeof(hFTIRMemMap) + 100);
+ qDebug() << "FTIRCreateMapping says: FileMapping opened: " << hFTIRMemMap;
+// pMemData = (FTIRMemMap *) MapViewOfFile(hFTIRMemMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(TRACKIRDATA) + sizeof(hFTIRMemMap) + 100);
+ pMemData = (FTIRMemMap *) MapViewOfFile(hFTIRMemMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(FTIRMemMap));
if (pMemData != NULL) {
+ qDebug() << "FTIRCreateMapping says: View of File mapped: " << pMemData;
pMemData->RegisteredHandle = handle; // The game uses the handle, to send a message that the Program-Name was set!
}
hFTIRMutex = CreateMutexA(NULL, false, FTIR_MUTEX);
diff --git a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h
index 6307c6a1..90518394 100644
--- a/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h
+++ b/FTNoIR_Protocol_FTIR/FTNoIR_Protocol_FTIR.h
@@ -40,7 +40,8 @@
#include "Windows.h"
//#include "math.h"
-typedef void (WINAPI *importSetPosition)(float x, float y, float z, float xRot, float yRot, float zRot);
+//typedef void (WINAPI *importSetPosition)(float, float, float, float, float, float);
+typedef int (WINAPI *importSetData)(TRACKIRDATA*);
typedef void (WINAPI *importTIRViewsStart)(void);
typedef void (WINAPI *importTIRViewsStop)(void);
@@ -62,7 +63,8 @@ private:
bool FTIRCreateMapping(HANDLE handle);
void FTIRDestroyMapping();
- importSetPosition setposition; // Function inside NPClient.dll
+// importSetPosition setposition; // Function inside NPClient.dll (old style)
+ importSetData setdata; // Function inside NPClient.dll
importTIRViewsStart viewsStart; // Functions inside TIRViews.dll
importTIRViewsStop viewsStop;
diff --git a/FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.h b/FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.h
index ce267d87..af9574ca 100644
--- a/FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.h
+++ b/FTNoIR_Protocol_MOUSE/FTNoIR_Protocol_MOUSE.h
@@ -30,6 +30,7 @@
#ifndef INCLUDED_MOUSESERVER_H
#define INCLUDED_MOUSESERVER_H
+//#include <Windows.h>
#include "..\ftnoir_protocol_base\ftnoir_protocol_base.h"
#include "ui_FTNoIR_MOUSEcontrols.h"
#include <QMessageBox>
@@ -38,7 +39,6 @@
#include <QProcess>
#include <QDebug>
#include <QFile>
-#include "Windows.h"
#define MOUSE_AXIS_MIN 0
#define MOUSE_AXIS_MAX 65535
diff --git a/FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.h b/FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.h
index 1b0116e3..1b98fab4 100644
--- a/FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.h
+++ b/FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.h
@@ -35,6 +35,7 @@
// This is necessary to run FaceTrackNoIR on a PC without FSX
//
#define SIMCONNECT_H_NOMANIFEST
+#define _WIN32_WINNT 0x0502
#include "Windows.h"
#include "SimConnect.h"
diff --git a/FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.vcproj b/FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.vcproj
index 6fa50fdf..141f3266 100644
--- a/FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.vcproj
+++ b/FTNoIR_Protocol_SC/FTNoIR_Protocol_SC.vcproj
@@ -57,7 +57,7 @@
Name="VCLinkerTool"
AdditionalDependencies="qtmain.lib QtCore4.lib QtGui4.lib"
OutputFile="$(OutDir)\$(ProjectName).dll"
- AdditionalLibraryDirectories="$(QTDIR)\lib"
+ AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;&quot;C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X SDK\SDK\Core Utilities Kit\SimConnect SDK\lib&quot;"
GenerateDebugInformation="false"
SubSystem="2"
/>
diff --git a/FTNoIR_Tracker_Base/ftnoir_tracker_base.h b/FTNoIR_Tracker_Base/ftnoir_tracker_base.h
index debd58e5..e2585ecf 100644
--- a/FTNoIR_Tracker_Base/ftnoir_tracker_base.h
+++ b/FTNoIR_Tracker_Base/ftnoir_tracker_base.h
@@ -30,63 +30,10 @@
#define FTNOIR_TRACKER_BASE_H
#include "ftnoir_tracker_base_global.h"
+#include "ftnoir_tracker_types.h"
#include <QtGui/QWidget>
#include <QtGui/QFrame>
-//
-// x,y,z position in centimetres, yaw, pitch and roll in degrees...
-//
-#pragma pack(push, 2)
-struct THeadPoseData {
- double x, y, z, yaw, pitch, roll;
- long frame_number;
-};
-#pragma pack(pop)
-
-//
-// Structure to hold all 6 DOF's
-//
-class T6DOF {
-public:
- T6DOF( double x, double y, double z,
- double yaw, double pitch, double roll ) {
- position.x = x;
- position.y = y;
- position.z = z;
- position.yaw = yaw;
- position.pitch = pitch;
- position.roll = roll;
- }
-
- void initHeadPoseData(){
- position.x = 0.0f;
- position.y = 0.0f;
- position.z = 0.0f;
- position.yaw = 0.0f;
- position.pitch = 0.0f;
- position.roll = 0.0f;
- position.frame_number = 0;
- }
- T6DOF operator-( T6DOF &other ) {
- return T6DOF(position.x - other.position.x, position.y - other.position.y, position.z - other.position.z,
- position.yaw - other.position.yaw, position.pitch - other.position.pitch, position.roll - other.position.roll);
- }
- T6DOF operator-=( T6DOF &other ) {
- return T6DOF(position.x - other.position.x, position.y - other.position.y, position.z - other.position.z,
- position.yaw - other.position.yaw, position.pitch - other.position.pitch, position.roll - other.position.roll);
- }
- T6DOF operator+( T6DOF &other ) {
- return T6DOF(position.x + other.position.x, position.y + other.position.y, position.z + other.position.z,
- position.yaw + other.position.yaw, position.pitch + other.position.pitch, position.roll + other.position.roll);
- }
- T6DOF operator+=( T6DOF &other ) {
- return T6DOF(position.x + other.position.x, position.y + other.position.y, position.z + other.position.z,
- position.yaw + other.position.yaw, position.pitch + other.position.pitch, position.roll + other.position.roll);
- }
-
- THeadPoseData position;
-};
-
// COM-Like abstract interface.
// This interface doesn't require __declspec(dllexport/dllimport) specifier.
// Method calls are dispatched via virtual table.
@@ -99,6 +46,15 @@ struct ITracker
virtual void StartTracker( HWND parent_window ) = 0;
virtual void StopTracker(bool exit) = 0;
virtual bool GiveHeadPoseData(THeadPoseData *data) = 0;
+
+ virtual void getFullName(QString *strToBeFilled) = 0;
+ virtual void getShortName(QString *strToBeFilled) = 0;
+ virtual void getDescription(QString *strToBeFilled) = 0;
+
+ virtual bool notifyZeroed() {
+ return false;
+ }
+ virtual void refreshVideo() {}
};
// Handle type. In C++ language the iterface type is used.
@@ -130,6 +86,11 @@ struct ITrackerDialog
{
virtual void Release() = 0; // Member required to enable Auto-remove
virtual void Initialize(QWidget *parent) = 0;
+
+ virtual void getFullName(QString *strToBeFilled) = 0;
+ virtual void getShortName(QString *strToBeFilled) = 0;
+ virtual void getDescription(QString *strToBeFilled) = 0;
+ virtual void getIcon(QIcon *icon) = 0;
};
// Handle type. In C++ language the iterface type is used.
diff --git a/FTNoIR_Tracker_FD/FTNoIR_FD_Controls.ui b/FTNoIR_Tracker_FD/FTNoIR_FD_Controls.ui
new file mode 100644
index 00000000..0bb8028f
--- /dev/null
+++ b/FTNoIR_Tracker_FD/FTNoIR_FD_Controls.ui
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UICFDClientControls</class>
+ <widget class="QWidget" name="UICFDClientControls">
+ <property name="windowModality">
+ <enum>Qt::ApplicationModal</enum>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>283</width>
+ <height>151</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle">
+ <string>FaceDetect tracker settings</string>
+ </property>
+ <property name="windowIcon">
+ <iconset>
+ <normaloff>images/FaceTrackNoIR.ico</normaloff>images/FaceTrackNoIR.ico</iconset>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item row="0" column="0">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Changes take effect after tracker restart.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Camera (indices from 0)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QSpinBox" name="cameraId">
+ <property name="maximum">
+ <number>100</number>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>Haar detection timeout (ms)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="redetect_ms">
+ <property name="maximum">
+ <number>2000</number>
+ </property>
+ <property name="singleStep">
+ <number>50</number>
+ </property>
+ <property name="value">
+ <number>200</number>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>Video Widget</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QCheckBox" name="videoWidget">
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton">
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+ <slots>
+ <slot>startEngineClicked()</slot>
+ <slot>stopEngineClicked()</slot>
+ <slot>cameraSettingsClicked()</slot>
+ </slots>
+</ui>
diff --git a/FTNoIR_Tracker_FD/FTNoIR_Tracker_FD.h b/FTNoIR_Tracker_FD/FTNoIR_Tracker_FD.h
new file mode 100644
index 00000000..ddb9afde
--- /dev/null
+++ b/FTNoIR_Tracker_FD/FTNoIR_Tracker_FD.h
@@ -0,0 +1,108 @@
+#include "..\ftnoir_tracker_base\ftnoir_tracker_base.h"
+#include "face-detect.h"
+#include "ui_FTNoIR_FD_controls.h"
+
+#include <Qt>
+#include <QtCore/QEvent>
+#include <Qt/qt_windows.h>
+
+#include <QMessageBox>
+#include <QSettings>
+#include <QProcess>
+#include "math.h"
+#include <Windows.h>
+
+using namespace std;
+
+static LPTSTR prog_cmdline = (LPTSTR) TEXT("face-detect.exe");
+static LPTSTR fd_shm_name = (LPTSTR) TEXT("face-detect-shm");
+static LPTSTR fd_mutex_name = (LPTSTR) TEXT("face-detect-mutex");
+
+class VideoWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ VideoWidget(HANDLE hMutex, unsigned char* data, struct face_detect_shm* shm);
+protected:
+ void paintEvent(QPaintEvent*);
+private:
+ HANDLE hMutex;
+ unsigned char* data;
+ struct face_detect_shm* shm;
+};
+
+class FTNoIR_Tracker : public ITracker
+{
+public:
+ FTNoIR_Tracker();
+ ~FTNoIR_Tracker();
+
+ void Release();
+ void Initialize( QFrame *videoframe );
+ void StartTracker( HWND parent_window );
+ void StopTracker( bool exit );
+ bool GiveHeadPoseData(THeadPoseData *data); // Returns true if confidence is good
+ void loadSettings();
+// bool setParameterValue(const int index, const float newvalue);
+ bool notifyZeroed();
+ void refreshVideo();
+
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
+
+private:
+ bool activep;
+ //QList<std::pair<float,float>> parameterRange;
+ //QList<float> parameterValueAsFloat;
+ void TerminateTracker();
+ HANDLE hMutex, hMapFile;
+ struct face_detect_shm* shm;
+ PROCESS_INFORMATION procInfo;
+ VideoWidget* ctrl;
+ QFrame* qframe;
+
+ QString trackerFullName; // Trackers' name and description
+ QString trackerShortName;
+ QString trackerDescription;
+
+};
+
+class TrackerControls: public QWidget, Ui::UICFDClientControls, public ITrackerDialog
+{
+ Q_OBJECT
+public:
+
+ explicit TrackerControls();
+ virtual ~TrackerControls();
+ void Release(); // Member functions which are accessible from outside the DLL
+ void Initialize(QWidget *parent);
+ void NotifyZeroing();
+
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
+ void getIcon(QIcon *icon);
+
+private:
+ Ui::UICFDClientControls ui;
+ void loadSettings();
+ void save();
+
+ bool settingsDirty;
+ HANDLE hMapFile, hMutex;
+ struct face_detect_shm* shm;
+
+ QString trackerFullName; // Trackers' name and description
+ QString trackerShortName;
+ QString trackerDescription;
+
+private slots:
+ void doOK();
+ void doCancel();
+ void settingChanged() { settingsDirty = true; };
+ void doSetRedetectMs(int val);
+ void doSetCameraId(int val);
+ void doSetVideoWidget(bool val);
+signals:
+}; \ No newline at end of file
diff --git a/FTNoIR_Tracker_FD/FTNoIR_Tracker_FD.vcproj b/FTNoIR_Tracker_FD/FTNoIR_Tracker_FD.vcproj
new file mode 100644
index 00000000..293e1ebf
--- /dev/null
+++ b/FTNoIR_Tracker_FD/FTNoIR_Tracker_FD.vcproj
@@ -0,0 +1,382 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="FTNoIR_Tracker_FD"
+ ProjectGUID="{0FE16301-240D-42B9-9141-12294BA08AC4}"
+ RootNamespace="FTNoIR_Tracker_FD"
+ Keyword="Qt4VSv1.0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)\bin"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=".\GeneratedFiles;&quot;$(QTDIR)\include&quot;;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include\qtmain&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;;&quot;$(QTDIR)\include\QtGui&quot;;.\"
+ PreprocessorDefinitions="UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_THREAD_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;FTNOIR_TRACKER_BASE_LIB;QT_DLL"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qtmain.lib QtCore4.lib QtGui4.lib QtNetwork4.lib gdiplus.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ AdditionalLibraryDirectories="&quot;$(QTDIR)\lib&quot;;&quot;C:\Users\sthalik\Documents\facetracknoir\face-detect&quot;"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=".\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;.\"
+ PreprocessorDefinitions="UNICODE,WIN32,QT_LARGEFILE_SUPPORT,QT_THREAD_SUPPORT,QT_CORE_LIB,QT_DLL"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="qtmaind.lib QtCored4.lib"
+ OutputFile="$(OutDir)\$(ProjectName).dll"
+ AdditionalLibraryDirectories="$(QTDIR)\lib"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;cxx;c;def"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\ftnoir_tracker_facedetect.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\ftnoir_tracker_facedetect_dialog.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\face-detect.h"
+ >
+ </File>
+ <File
+ RelativePath="..\FTNoIR_Tracker_Base\ftnoir_tracker_base.h"
+ >
+ </File>
+ <File
+ RelativePath=".\FTNoIR_Tracker_FD.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing FTNoIR_Tracker_FD.h..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DFTNOIR_TRACKER_BASE_LIB -DQT_DLL -D_WINDLL -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtNetwork\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\FTNoIR_Tracker_FD.h&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Form Files"
+ Filter="ui"
+ UniqueIdentifier="{99349809-55BA-4b9d-BF79-8FDBB0286EB3}"
+ >
+ <File
+ RelativePath=".\FTNoIR_FD_Controls.ui"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Uic&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\uic.exe&quot; -o &quot;.\GeneratedFiles\ui_$(InputName).h&quot; &quot;$(InputPath)&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="$(QTDIR)\bin\uic.exe"
+ Outputs="&quot;.\GeneratedFiles\ui_$(InputName).h&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="qrc;*"
+ UniqueIdentifier="{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}"
+ ParseFiles="false"
+ >
+ <File
+ RelativePath=".\Tracker.qrc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);.\images\Visage.ico"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);.\images\Visage.ico"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\images\Visage.ico"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ Filter="moc;h;cpp"
+ UniqueIdentifier="{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}"
+ >
+ <File
+ RelativePath=".\generatedfiles\qrc_Tracker.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="Release"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\generatedfiles\release\moc_FTNoIR_Tracker_FD.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Debug"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\generatedfiles\debug\moc_FTNoIR_Tracker_FD.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ <Global
+ Name="lupdateOnBuild"
+ Value="0"
+ />
+ <Global
+ Name="MocDir"
+ Value=".\GeneratedFiles\$(ConfigurationName)"
+ />
+ <Global
+ Name="MocOptions"
+ Value=""
+ />
+ <Global
+ Name="QtVersion Win32"
+ Value="$(DefaultQtVersion)"
+ />
+ <Global
+ Name="RccDir"
+ Value=".\GeneratedFiles"
+ />
+ <Global
+ Name="UicDir"
+ Value=".\GeneratedFiles"
+ />
+ </Globals>
+</VisualStudioProject>
diff --git a/FTNoIR_Tracker_FD/Tracker.qrc b/FTNoIR_Tracker_FD/Tracker.qrc
new file mode 100644
index 00000000..d988ba71
--- /dev/null
+++ b/FTNoIR_Tracker_FD/Tracker.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>images/FaceDetect.ico</file>
+ </qresource>
+</RCC>
diff --git a/FTNoIR_Tracker_FD/face-detect.h b/FTNoIR_Tracker_FD/face-detect.h
new file mode 100644
index 00000000..fc359c53
--- /dev/null
+++ b/FTNoIR_Tracker_FD/face-detect.h
@@ -0,0 +1,39 @@
+#if defined(_WIN32) || defined(WIN32)
+# ifdef __cplusplus
+# define FDAPI_EXTERN extern "C"
+# else
+# define FDAPI_EXTERN
+# endif
+# define FDAPI(ret) FDAPI_EXTERN __declspec(dllexport) ret __cdecl
+#else
+# define FDAPI(ret) ret
+#endif
+
+struct face_detect_settings {
+ unsigned char magic, quit, newOutput, widgetp;
+ int redetect_ms, camera_id;
+};
+
+struct face_detect;
+FDAPI(struct face_detect*) face_detect_init(const char* eyes_model,
+ const char* nose_model,
+ const char* mouth_model,
+ const char* face_model,
+ int capture_no,
+ struct face_detect_settings* settings);
+FDAPI(void) face_detect_free(struct face_detect *ctx);
+FDAPI(int) face_detect_cycle(struct face_detect *ctx, float *data);
+FDAPI(void) face_detect_zero(struct face_detect *ctx);
+
+FDAPI(unsigned char*) face_detect_video(struct face_detect* ctx);
+
+#define FD_VIDEO_WIDTH 252
+#define FD_VIDEO_HEIGHT 189
+#define FD_MAGIC 0x42
+
+struct face_detect_shm {
+ unsigned char zerop, received;
+ float data[6];
+ unsigned char pixels[FD_VIDEO_WIDTH * FD_VIDEO_HEIGHT * 3];
+ struct face_detect_settings settings;
+};
diff --git a/FTNoIR_Tracker_FD/ftnoir_tracker_facedetect.cpp b/FTNoIR_Tracker_FD/ftnoir_tracker_facedetect.cpp
new file mode 100644
index 00000000..7f1c1529
--- /dev/null
+++ b/FTNoIR_Tracker_FD/ftnoir_tracker_facedetect.cpp
@@ -0,0 +1,251 @@
+/* Copyright (c) 2012 Stanislaw Halik
+ *
+ * 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.
+ */
+
+#include "ftnoir_tracker_fd.h"
+#include <Qt>
+#include <QPainter>
+#include <QPaintEngine>
+
+static void load_settings(struct face_detect_settings* out) {
+ qDebug("[!] load_settings()");
+ 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)
+
+ iniFile.beginGroup ( "FaceDetectTracker" );
+ out->redetect_ms = iniFile.value("RedetectMs", 500).toInt();
+ out->camera_id = iniFile.value("CameraId", 0).toInt();
+ out->quit = 0;
+ out->newOutput = 0;
+ out->magic = FD_MAGIC;
+ out->widgetp = iniFile.value("VideoWidget", true).toBool();
+ iniFile.endGroup ();
+}
+
+static void save_settings(const struct face_detect_settings* in) {
+
+ 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)
+
+ iniFile.beginGroup ( "FaceDetectTracker" );
+ iniFile.setValue("RedetectMs", in->redetect_ms);
+ iniFile.setValue("CameraId", in->camera_id);
+ iniFile.setValue("VideoWidget", in->widgetp);
+ iniFile.endGroup ();
+}
+
+VideoWidget::VideoWidget(HANDLE hMutex, unsigned char* data, struct face_detect_shm* shm) {
+ this->hMutex = hMutex;
+ this->data = data;
+ this->shm = shm;
+}
+
+void VideoWidget::paintEvent(QPaintEvent*) {
+ WaitForSingleObject(hMutex, INFINITE);
+ if (!this->shm->settings.widgetp) {
+ ReleaseMutex(hMutex);
+ return;
+ }
+ QPainter painter(this);
+ QImage image(data, FD_VIDEO_WIDTH, FD_VIDEO_HEIGHT, QImage::Format_RGB888);
+ QRectF rect(0, 0, FD_VIDEO_WIDTH, FD_VIDEO_HEIGHT);
+ painter.paintEngine()->drawImage(rect, image.rgbSwapped(), rect);
+ ReleaseMutex(hMutex);
+}
+
+FTNoIR_Tracker::FTNoIR_Tracker()
+{
+ qDebug("making tracker FaceDetect");
+ ////allocate memory for the parameters
+ //parameterValueAsFloat.clear();
+ //parameterRange.clear();
+
+ //// Add the parameters to the list
+ //parameterRange.append(std::pair<float,float>(1000.0f,9999.0f));
+ //parameterValueAsFloat.append(0.0f);
+ ////setParameterValue(kPortAddress,5551.0f);
+
+ hMutex = CreateMutex(NULL, false, fd_mutex_name);
+ hMapFile = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(struct face_detect_shm), fd_shm_name);
+ shm = (struct face_detect_shm*) MapViewOfFile(hMapFile, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, sizeof(struct face_detect_shm));
+ memset(shm, 0, sizeof(struct face_detect_shm));
+ activep = 0;
+ procInfo.hProcess = INVALID_HANDLE_VALUE;
+ ctrl = NULL;
+ qframe = NULL;
+
+ //populate the description strings
+ trackerFullName = "faceDetect V1.0.0";
+ trackerShortName = "faceDetect";
+ trackerDescription = "Stans' faceDetect V1.0.0";
+
+}
+
+void FTNoIR_Tracker::TerminateTracker() {
+ if (procInfo.hProcess != INVALID_HANDLE_VALUE) {
+ shm->settings.quit = 1;
+ //TerminateProcess(procInfo.hProcess, 42);
+ CloseHandle(procInfo.hProcess);
+ CloseHandle(procInfo.hThread);
+ procInfo.hProcess = INVALID_HANDLE_VALUE;
+ }
+}
+
+FTNoIR_Tracker::~FTNoIR_Tracker()
+{
+ WaitForSingleObject(hMutex, INFINITE);
+ TerminateTracker();
+ UnmapViewOfFile(shm);
+ //CloseHandle(hMapFile);
+ ReleaseMutex(hMutex);
+ //CloseHandle(hMutex);
+}
+
+void FTNoIR_Tracker::Release()
+{
+ qDebug("FTNoIR_Tracker::Release says: Starting ");
+ delete this;
+}
+
+void FTNoIR_Tracker::Initialize( QFrame *videoframe )
+{
+ qDebug("FTNoIR_Tracker::Initialize()");
+ WaitForSingleObject(hMutex, INFINITE);
+ videoframe->setAttribute(Qt::WA_NativeWindow);
+ videoframe->show();
+ ctrl = new VideoWidget(hMutex, shm->pixels, shm);
+ QHBoxLayout* layout = new QHBoxLayout();
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->addWidget(ctrl);
+ videoframe->setLayout(layout);
+ ctrl->resize(FD_VIDEO_WIDTH, FD_VIDEO_HEIGHT);
+ qframe = videoframe;
+ loadSettings();
+ ReleaseMutex(hMutex);
+}
+
+void FTNoIR_Tracker::refreshVideo() {
+ QWidget* w;
+ WaitForSingleObject(hMutex, INFINITE);
+ w = ctrl;
+ ReleaseMutex(hMutex);
+ if (w != NULL)
+ w->update();
+}
+
+void FTNoIR_Tracker::StartTracker( HWND parent_window )
+{
+ WaitForSingleObject(hMutex, INFINITE);
+ qDebug("* tracker starting");
+ activep = true;
+ ReleaseMutex(hMutex);
+}
+
+void FTNoIR_Tracker::StopTracker( bool exit )
+{
+ WaitForSingleObject(hMutex, INFINITE);
+ qDebug("* tracker stopping");
+ activep = false;
+ if (exit) {
+ TerminateTracker();
+ if (qframe && qframe->layout()) {
+ delete qframe->layout();
+ qframe = NULL;
+ }
+ if (ctrl) {
+ delete ctrl;
+ ctrl = NULL;
+ }
+ }
+ ReleaseMutex(hMutex);
+}
+
+bool FTNoIR_Tracker::notifyZeroed() {
+ qDebug("notifying of zero");
+ WaitForSingleObject(hMutex, INFINITE);
+ shm->zerop = 1;
+ ReleaseMutex(hMutex);
+ return true;
+}
+
+bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
+{
+ WaitForSingleObject(hMutex, INFINITE);
+ if (procInfo.hProcess == INVALID_HANDLE_VALUE) {
+ STARTUPINFO si;
+ SECURITY_ATTRIBUTES sa;
+ sa.bInheritHandle = 1;
+ sa.lpSecurityDescriptor = NULL;
+ sa.nLength = sizeof(SECURITY_ATTRIBUTES);
+ memset(&si, 0, sizeof(STARTUPINFO));
+ si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
+ si.cb = sizeof(STARTUPINFO);
+ si.hStdOutput = NULL;
+ si.hStdError = NULL;
+ si.hStdInput = NULL;
+ if (!CreateProcess(prog_cmdline, NULL, NULL, NULL, true, 0, NULL, NULL, &si, &procInfo)) {
+ qDebug("Badness! %d", GetLastError());
+ }
+ }
+
+ shm->received = 1;
+
+ if (activep) {
+ shm->settings.newOutput = 0;
+ data->x = shm->data[3];
+ data->y = shm->data[4];
+ data->z = shm->data[5];
+ data->yaw = shm->data[0];
+ data->pitch = shm->data[1];
+ data->roll = shm->data[2];
+ ReleaseMutex(hMutex);
+ return true;
+ }
+ ReleaseMutex(hMutex);
+ return false;
+}
+
+void FTNoIR_Tracker::getFullName(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerFullName;
+};
+
+
+void FTNoIR_Tracker::getShortName(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerShortName;
+};
+
+
+void FTNoIR_Tracker::getDescription(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerDescription;
+};
+
+//
+// Load the current Settings from the currently 'active' INI-file.
+//
+void FTNoIR_Tracker::loadSettings() {
+ load_settings(&shm->settings);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Factory function that creates instances if the Tracker object.
+
+// Export both decorated and undecorated names.
+// GetTracker - Undecorated name, which can be easily used with GetProcAddress
+// Win32 API function.
+// _GetTracker@0 - Common name decoration for __stdcall functions in C language.
+#pragma comment(linker, "/export:GetTracker=_GetTracker@0")
+
+FTNOIR_TRACKER_BASE_EXPORT TRACKERHANDLE __stdcall GetTracker()
+{
+ return new FTNoIR_Tracker;
+}
diff --git a/FTNoIR_Tracker_FD/ftnoir_tracker_facedetect_dialog.cpp b/FTNoIR_Tracker_FD/ftnoir_tracker_facedetect_dialog.cpp
new file mode 100644
index 00000000..a39d8bf2
--- /dev/null
+++ b/FTNoIR_Tracker_FD/ftnoir_tracker_facedetect_dialog.cpp
@@ -0,0 +1,208 @@
+/* Copyright (c) 2012 Stanislaw Halik
+ *
+ * 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.
+ */
+
+#include "ftnoir_tracker_fd.h"
+#include <Qt>
+#include <QPainter>
+#include <QPaintEngine>
+
+//*******************************************************************************************************
+// faceDetect Settings-dialog.
+//*******************************************************************************************************
+
+static void load_settings(struct face_detect_settings* out) {
+ qDebug("[!] load_settings()");
+ 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)
+
+ iniFile.beginGroup ( "FaceDetectTracker" );
+ out->redetect_ms = iniFile.value("RedetectMs", 500).toInt();
+ out->camera_id = iniFile.value("CameraId", 0).toInt();
+ out->quit = 0;
+ out->newOutput = 0;
+ out->magic = FD_MAGIC;
+ out->widgetp = iniFile.value("VideoWidget", true).toBool();
+ iniFile.endGroup ();
+}
+
+static void save_settings(const struct face_detect_settings* in) {
+
+ 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)
+
+ iniFile.beginGroup ( "FaceDetectTracker" );
+ iniFile.setValue("RedetectMs", in->redetect_ms);
+ iniFile.setValue("CameraId", in->camera_id);
+ iniFile.setValue("VideoWidget", in->widgetp);
+ iniFile.endGroup ();
+}
+
+
+//
+// Constructor for server-settings-dialog
+//
+TrackerControls::TrackerControls() :
+QWidget()
+{
+ qDebug("[!] TrackerControls::TrackerControls()");
+ hMapFile = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(struct face_detect_shm), fd_shm_name);
+ shm = (struct face_detect_shm*) MapViewOfFile(hMapFile, FILE_MAP_READ | FILE_MAP_WRITE, 0, 0, sizeof(struct face_detect_shm));
+ hMutex = CreateMutex(NULL, false, fd_mutex_name);
+ ui.setupUi( this );
+
+ load_settings(&shm->settings);
+
+ ui.redetect_ms->setValue(shm->settings.redetect_ms);
+ ui.cameraId->setValue(shm->settings.camera_id);
+ ui.videoWidget->setChecked(shm->settings.widgetp);
+
+ settingsDirty = false;
+
+ // what a load of boilerplate...
+ QObject::connect(ui.okButton, SIGNAL(clicked()), this, SLOT(doOK()));
+ QObject::connect(ui.cancelButton, SIGNAL(clicked()), this, SLOT(doCancel()));
+ QObject::connect(ui.redetect_ms, SIGNAL(valueChanged(int)), this, SLOT(doSetRedetectMs(int)));
+ QObject::connect(ui.cameraId, SIGNAL(valueChanged(int)), this, SLOT(doSetCameraId(int)));
+ QObject::connect(ui.videoWidget, SIGNAL(toggled(bool)), this, SLOT(doSetVideoWidget(bool)));
+
+ //populate the description strings
+ trackerFullName = "faceDetect V1.0.0";
+ trackerShortName = "faceDetect";
+ trackerDescription = "Stans' faceDetect V1.0.0";
+
+}
+
+void TrackerControls::save() {
+ save_settings(&shm->settings);
+ settingsDirty = false;
+}
+
+void TrackerControls::doSetCameraId(int val) {
+ settingsDirty = true;
+ WaitForSingleObject(hMutex, INFINITE);
+ shm->settings.camera_id = val;
+ ReleaseMutex(hMutex);
+}
+
+void TrackerControls::doSetVideoWidget(bool val) {
+ settingsDirty = true;
+ WaitForSingleObject(hMutex, INFINITE);
+ shm->settings.widgetp = val;
+ ReleaseMutex(hMutex);
+}
+
+void TrackerControls::doSetRedetectMs(int val) {
+ settingsDirty = true;
+ WaitForSingleObject(hMutex, INFINITE);
+ shm->settings.redetect_ms = val;
+ ReleaseMutex(hMutex);
+}
+
+//
+// Destructor for server-dialog
+//
+TrackerControls::~TrackerControls() {
+ UnmapViewOfFile(shm);
+ //CloseHandle(hMutex);
+ //CloseHandle(hMapFile);
+}
+
+void TrackerControls::Release()
+{
+ delete this;
+}
+
+//
+// Initialize tracker-client-dialog
+//
+void TrackerControls::Initialize(QWidget *parent) {
+
+ QPoint offsetpos(200, 200);
+ if (parent) {
+ this->move(parent->pos() + offsetpos);
+ }
+ show();
+}
+
+//
+// OK clicked on server-dialog
+//
+void TrackerControls::doOK() {
+ save();
+ this->close();
+}
+
+//
+// Cancel clicked on server-dialog
+//
+void TrackerControls::doCancel() {
+ //
+ // Ask if changed Settings should be saved
+ //
+ if (settingsDirty) {
+ int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
+
+ switch (ret) {
+ case QMessageBox::Save:
+ save();
+ this->close();
+ break;
+ case QMessageBox::Discard:
+ this->close();
+ break;
+ case QMessageBox::Cancel:
+ // Cancel was clicked
+ break;
+ default:
+ // should never be reached
+ break;
+ }
+ }
+ else {
+ this->close();
+ }
+}
+
+void TrackerControls::getFullName(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerFullName;
+};
+
+
+void TrackerControls::getShortName(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerShortName;
+};
+
+
+void TrackerControls::getDescription(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerDescription;
+};
+
+void TrackerControls::getIcon(QIcon *icon)
+{
+ *icon = QIcon(":/images/SeeingMachines.ico");
+};
+
+////////////////////////////////////////////////////////////////////////////////
+// Factory function that creates instances if the Tracker-settings dialog object.
+
+// Export both decorated and undecorated names.
+// GetTrackerDialog - Undecorated name, which can be easily used with GetProcAddress
+// Win32 API function.
+// _GetTrackerDialog@0 - Common name decoration for __stdcall functions in C language.
+#pragma comment(linker, "/export:GetTrackerDialog=_GetTrackerDialog@0")
+
+FTNOIR_TRACKER_BASE_EXPORT TRACKERDIALOGHANDLE __stdcall GetTrackerDialog( )
+{
+ return new TrackerControls;
+}
diff --git a/FTNoIR_Tracker_FD/images/FaceDetect.ico b/FTNoIR_Tracker_FD/images/FaceDetect.ico
new file mode 100644
index 00000000..8e862cee
--- /dev/null
+++ b/FTNoIR_Tracker_FD/images/FaceDetect.ico
Binary files differ
diff --git a/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h b/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h
index 4a26a824..a4933c35 100644
--- a/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h
+++ b/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.h
@@ -1,3 +1,27 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage: http://facetracknoir.sourceforge.net/home/default.htm *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+********************************************************************************/
#include "..\ftnoir_tracker_base\ftnoir_tracker_base.h"
#include "..\ftnoir_tracker_base\ftnoir_tracker_sm_types.h"
#include "ui_FTNoIR_SM_controls.h"
@@ -10,11 +34,11 @@
using namespace std;
-class FTNoIR_Tracker_SM : public ITracker
+class FTNoIR_Tracker : public ITracker
{
public:
- FTNoIR_Tracker_SM();
- ~FTNoIR_Tracker_SM();
+ FTNoIR_Tracker();
+ ~FTNoIR_Tracker();
void Release();
void Initialize( QFrame *videoframe );
@@ -24,7 +48,9 @@ public:
void loadSettings();
bool SMCreateMapping();
- bool setParameterValue(const int index, const float newvalue);
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
private:
//
@@ -33,32 +59,32 @@ private:
HANDLE hSMMemMap;
SMMemMap *pMemData;
HANDLE hSMMutex;
-// smEngineHeadPoseData new_head_pose;
QProcess *faceAPI;
- enum
- {
- kPortAddress=0, // Index in QList
- kNumFilterParameters // Indicate number of parameters used
- };
- QList<std::pair<float,float>> parameterRange;
- QList<float> parameterValueAsFloat;
+ QString trackerFullName; // Trackers' name and description
+ QString trackerShortName;
+ QString trackerDescription;
};
// Widget that has controls for SMoIR protocol client-settings.
-class SMClientControls: public QWidget, Ui::UICSMClientControls, public ITrackerDialog
+class TrackerControls: public QWidget, Ui::UICSMClientControls, public ITrackerDialog
{
Q_OBJECT
public:
- explicit SMClientControls();
- virtual ~SMClientControls();
+ explicit TrackerControls();
+ virtual ~TrackerControls();
void showEvent ( QShowEvent * event );
void Release(); // Member functions which are accessible from outside the DLL
void Initialize(QWidget *parent);
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
+ void getIcon(QIcon *icon);
+
private:
Ui::UICSMClientControls ui;
void loadSettings();
@@ -80,6 +106,10 @@ private:
smEngineHandle *engine_handle;
QTimer *timUpdateSettings; // Timer to display current settings
+ QString trackerFullName; // Trackers' name and description
+ QString trackerShortName;
+ QString trackerDescription;
+
private slots:
void doOK();
void doCancel();
diff --git a/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.vcproj b/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.vcproj
index b174725d..b5a3e5f4 100644
--- a/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.vcproj
+++ b/FTNoIR_Tracker_SM/FTNoIR_Tracker_SM.vcproj
@@ -171,6 +171,10 @@
RelativePath=".\ftnoir_tracker_faceapi.cpp"
>
</File>
+ <File
+ RelativePath=".\ftnoir_tracker_faceapi_dialog.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Header Files"
@@ -178,6 +182,14 @@
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
+ RelativePath="..\FTNoIR_Tracker_Base\ftnoir_tracker_base.h"
+ >
+ </File>
+ <File
+ RelativePath="..\FTNoIR_Tracker_Base\ftnoir_tracker_base_global.h"
+ >
+ </File>
+ <File
RelativePath=".\FTNoIR_Tracker_SM.h"
>
<FileConfiguration
@@ -203,6 +215,10 @@
/>
</FileConfiguration>
</File>
+ <File
+ RelativePath="..\FTNoIR_Tracker_Base\ftnoir_tracker_types.h"
+ >
+ </File>
</Filter>
<Filter
Name="Form Files"
@@ -242,6 +258,52 @@
UniqueIdentifier="{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}"
ParseFiles="false"
>
+ <File
+ RelativePath=".\images\filter-16-ac.png"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Tracker.qrc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);.\images\filter-16-ac.png"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Rcc&apos;ing $(InputFileName)..."
+ CommandLine="&quot;$(QTDIR)\bin\rcc.exe&quot; -name &quot;$(InputName)&quot; -no-compress &quot;$(InputPath)&quot; -o .\GeneratedFiles\qrc_$(InputName).cpp&#x0D;&#x0A;"
+ AdditionalDependencies="$(InputPath);.\images\filter-16-ac.png"
+ Outputs=".\GeneratedFiles\qrc_$(InputName).cpp"
+ />
+ </FileConfiguration>
+ </File>
</Filter>
<Filter
Name="Generated Files"
@@ -250,6 +312,26 @@
SourceControlFiles="false"
>
<File
+ RelativePath=".\generatedfiles\qrc_Tracker.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath=".\GeneratedFiles\ui_FTNoIR_SM_Controls.h"
>
</File>
diff --git a/FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp b/FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp
index 181a0e1d..c9b3bc0b 100644
--- a/FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp
+++ b/FTNoIR_Tracker_SM/ftnoir_tracker_faceapi.cpp
@@ -1,20 +1,39 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage: http://facetracknoir.sourceforge.net/home/default.htm *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+********************************************************************************/
#include "ftnoir_tracker_sm.h"
-//#include "sm_api_headtrackerv2controls.h"
#include <QtGui>
-FTNoIR_Tracker_SM::FTNoIR_Tracker_SM()
+FTNoIR_Tracker::FTNoIR_Tracker()
{
- //allocate memory for the parameters
- parameterValueAsFloat.clear();
- parameterRange.clear();
-
- // Add the parameters to the list
- parameterRange.append(std::pair<float,float>(1000.0f,9999.0f));
- parameterValueAsFloat.append(0.0f);
- setParameterValue(kPortAddress,5551.0f);
+ //populate the description strings
+ trackerFullName = "faceAPI V3.2.6";
+ trackerShortName = "faceAPI";
+ trackerDescription = "SeeingMachines faceAPI V3.2.6";
}
-FTNoIR_Tracker_SM::~FTNoIR_Tracker_SM()
+FTNoIR_Tracker::~FTNoIR_Tracker()
{
qDebug() << "stopTracker says: terminating";
@@ -27,9 +46,9 @@ FTNoIR_Tracker_SM::~FTNoIR_Tracker_SM()
hSMMemMap = 0;
}
-void FTNoIR_Tracker_SM::Release()
+void FTNoIR_Tracker::Release()
{
- qDebug() << "FTNoIR_Tracker_SM::Release says: Starting ";
+ qDebug() << "FTNoIR_Tracker::Release says: Starting ";
if ( pMemData != NULL ) {
pMemData->command = FT_SM_EXIT; // Issue 'exit' command
@@ -37,12 +56,12 @@ void FTNoIR_Tracker_SM::Release()
delete this;
}
-void FTNoIR_Tracker_SM::Initialize( QFrame *videoframe )
+void FTNoIR_Tracker::Initialize( QFrame *videoframe )
{
- qDebug() << "FTNoIR_Tracker_SM::Initialize says: Starting ";
+ qDebug() << "FTNoIR_Tracker::Initialize says: Starting ";
if (SMCreateMapping()) {
- qDebug() << "FTNoIR_Tracker_SM::Initialize Mapping created.";
+ qDebug() << "FTNoIR_Tracker::Initialize Mapping created.";
}
else {
QMessageBox::warning(0,"FaceTrackNoIR Error","Memory mapping not created!",QMessageBox::Ok,QMessageBox::NoButton);
@@ -63,13 +82,13 @@ void FTNoIR_Tracker_SM::Initialize( QFrame *videoframe )
faceAPI->start(program);
// Show the video widget
- qDebug() << "FTNoIR_Tracker_SM::Initialize says: videoframe = " << videoframe;
+ qDebug() << "FTNoIR_Tracker::Initialize says: videoframe = " << videoframe;
videoframe->show();
return;
}
-void FTNoIR_Tracker_SM::StartTracker( HWND parent_window )
+void FTNoIR_Tracker::StartTracker( HWND parent_window )
{
if ( pMemData != NULL ) {
pMemData->command = FT_SM_START; // Start command
@@ -77,10 +96,10 @@ void FTNoIR_Tracker_SM::StartTracker( HWND parent_window )
return;
}
-void FTNoIR_Tracker_SM::StopTracker( bool exit )
+void FTNoIR_Tracker::StopTracker( bool exit )
{
- qDebug() << "FTNoIR_Tracker_SM::StopTracker says: Starting ";
+ qDebug() << "FTNoIR_Tracker::StopTracker says: Starting ";
// stops the faceapi engine
if ( pMemData != NULL ) {
// if (exit == true) {
@@ -93,14 +112,14 @@ void FTNoIR_Tracker_SM::StopTracker( bool exit )
return;
}
-bool FTNoIR_Tracker_SM::GiveHeadPoseData(THeadPoseData *data)
+bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
{
//
// Check if the pointer is OK and wait for the Mutex.
//
if ( (pMemData != NULL) && (WaitForSingleObject(hSMMutex, 100) == WAIT_OBJECT_0) ) {
-// qDebug() << "FTNoIR_Tracker_SM::GiveHeadPoseData says: Retrieving data.";
+// qDebug() << "FTNoIR_Tracker::GiveHeadPoseData says: Retrieving data.";
//
// Copy the measurements to FaceTrackNoIR.
@@ -123,46 +142,35 @@ bool FTNoIR_Tracker_SM::GiveHeadPoseData(THeadPoseData *data)
return false;
}
-bool FTNoIR_Tracker_SM::setParameterValue(const int index, const float newvalue)
+void FTNoIR_Tracker::getFullName(QString *strToBeFilled)
{
- if ((index >= 0) && (index < parameterValueAsFloat.size()))
- {
- //
- // Limit the new value, using the defined range.
- //
- if (newvalue < parameterRange[index].first) {
- parameterValueAsFloat[index] = parameterRange[index].first;
- }
- else {
- if (newvalue > parameterRange[index].second) {
- parameterValueAsFloat[index] = parameterRange[index].second;
- }
- else {
- parameterValueAsFloat[index] = newvalue;
- }
- }
+ *strToBeFilled = trackerFullName;
+};
-// updateParameterString(index);
- return true;
- }
- else
- {
- return false;
- }
+
+void FTNoIR_Tracker::getShortName(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerShortName;
+};
+
+
+void FTNoIR_Tracker::getDescription(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerDescription;
};
//
// Load the current Settings from the currently 'active' INI-file.
//
-void FTNoIR_Tracker_SM::loadSettings() {
+void FTNoIR_Tracker::loadSettings() {
- qDebug() << "FTNoIR_Tracker_SM::loadSettings says: Starting ";
+ qDebug() << "FTNoIR_Tracker::loadSettings says: Starting ";
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)
- qDebug() << "FTNoIR_Tracker_SM::loadSettings says: iniFile = " << currentFile;
+ qDebug() << "FTNoIR_Tracker::loadSettings says: iniFile = " << currentFile;
iniFile.beginGroup ( "SMTracker" );
if (pMemData) {
@@ -176,9 +184,9 @@ void FTNoIR_Tracker_SM::loadSettings() {
// It contains the tracking data, a command-code from FaceTrackNoIR
//
//
-bool FTNoIR_Tracker_SM::SMCreateMapping()
+bool FTNoIR_Tracker::SMCreateMapping()
{
- qDebug() << "FTNoIR_Tracker_SM::FTCreateMapping says: Starting Function";
+ qDebug() << "FTNoIR_Tracker::FTCreateMapping says: Starting Function";
//
// A FileMapping is used to create 'shared memory' between the faceAPI and FaceTrackNoIR.
@@ -191,7 +199,7 @@ bool FTNoIR_Tracker_SM::SMCreateMapping()
(LPCSTR) SM_MM_DATA );
if ( hSMMemMap != 0 ) {
- qDebug() << "FTNoIR_Tracker_SM::FTCreateMapping says: FileMapping Created!";
+ qDebug() << "FTNoIR_Tracker::FTCreateMapping says: FileMapping Created!";
}
if ( ( hSMMemMap != 0 ) && ( (long) GetLastError == ERROR_ALREADY_EXISTS ) ) {
@@ -204,16 +212,16 @@ bool FTNoIR_Tracker_SM::SMCreateMapping()
//
hSMMemMap = OpenFileMappingA( FILE_MAP_ALL_ACCESS , false , (LPCSTR) SM_MM_DATA );
if ( ( hSMMemMap != 0 ) ) {
- qDebug() << "FTNoIR_Tracker_SM::FTCreateMapping says: FileMapping Created again..." << hSMMemMap;
+ qDebug() << "FTNoIR_Tracker::FTCreateMapping says: FileMapping Created again..." << hSMMemMap;
pMemData = (SMMemMap *) MapViewOfFile(hSMMemMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(TFaceData));
if (pMemData != NULL) {
- qDebug() << "FTNoIR_Tracker_SM::FTCreateMapping says: MapViewOfFile OK.";
+ qDebug() << "FTNoIR_Tracker::FTCreateMapping says: MapViewOfFile OK.";
// pMemData->handle = handle; // The game uses the handle, to send a message that the Program-Name was set!
}
hSMMutex = CreateMutexA(NULL, false, SM_MUTEX);
}
else {
- qDebug() << "FTNoIR_Tracker_SM::FTCreateMapping says: Error creating Shared Memory for faceAPI!";
+ qDebug() << "FTNoIR_Tracker::FTCreateMapping says: Error creating Shared Memory for faceAPI!";
return false;
}
@@ -239,294 +247,5 @@ bool FTNoIR_Tracker_SM::SMCreateMapping()
FTNOIR_TRACKER_BASE_EXPORT TRACKERHANDLE __stdcall GetTracker()
{
- return new FTNoIR_Tracker_SM;
-}
-
-//*******************************************************************************************************
-// faceAPI Client Settings-dialog.
-//*******************************************************************************************************
-
-//
-// Constructor for server-settings-dialog
-//
-SMClientControls::SMClientControls() :
-QWidget()
-{
- ui.setupUi( this );
-
- // Connect Qt signals to member-functions
- connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
- connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
- connect(ui.btnEngineStart, SIGNAL(clicked()), this, SLOT(doStartEngine()));
- connect(ui.btnEngineStop, SIGNAL(clicked()), this, SLOT(doStopEngine()));
-
- ui.cbxFilterSetting->addItem("None");
- ui.cbxFilterSetting->addItem("Normal");
- ui.cbxFilterSetting->addItem("High");
- connect(ui.cbxFilterSetting, SIGNAL(currentIndexChanged(int)), this, SLOT(doSetFilter( int )));
- connect(ui.btnCameraSettings, SIGNAL(clicked()), this, SLOT(doShowCam()));
-
- if (SMCreateMapping()) {
- qDebug() << "SMClientControls::Initialize Mapping created.";
- }
- else {
- QMessageBox::warning(0,"FaceTrackNoIR Error","Memory mapping not created!",QMessageBox::Ok,QMessageBox::NoButton);
- }
-
- // Load the settings from the current .INI-file
- loadSettings();
-
- //Setup the timer for showing the headpose.
- timUpdateSettings = new QTimer(this);
- connect(timUpdateSettings, SIGNAL(timeout()), this, SLOT(doTimUpdate()));
- timUpdateSettings->start(100);
- connect(this, SIGNAL(stateChanged( int )), this, SLOT(showSettings( int )));
-
-}
-
-//
-// Destructor for server-dialog
-//
-SMClientControls::~SMClientControls() {
- qDebug() << "~SMClientControls() says: started";
-}
-
-void SMClientControls::Release()
-{
- delete this;
-}
-
-//
-// Initialize tracker-client-dialog
-//
-void SMClientControls::Initialize(QWidget *parent) {
-
- QPoint offsetpos(200, 200);
- if (parent) {
- this->move(parent->pos() + offsetpos);
- }
- show();
-}
-
-//
-// OK clicked on server-dialog
-//
-void SMClientControls::doOK() {
- save();
- this->close();
-}
-
-// override show event
-void SMClientControls::showEvent ( QShowEvent * event ) {
- loadSettings();
-}
-
-//
-// Cancel clicked on server-dialog
-//
-void SMClientControls::doCancel() {
- //
- // Ask if changed Settings should be saved
- //
- if (settingsDirty) {
- int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
-
- qDebug() << "doCancel says: answer =" << ret;
-
- switch (ret) {
- case QMessageBox::Save:
- save();
- this->close();
- break;
- case QMessageBox::Discard:
- this->close();
- break;
- case QMessageBox::Cancel:
- // Cancel was clicked
- break;
- default:
- // should never be reached
- break;
- }
- }
- else {
- this->close();
- }
-}
-
-//
-// Load the current Settings from the currently 'active' INI-file.
-//
-void SMClientControls::loadSettings() {
-
-// qDebug() << "loadSettings says: Starting ";
- 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)
-
-// qDebug() << "loadSettings says: iniFile = " << currentFile;
-
- iniFile.beginGroup ( "SMTracker" );
- ui.cbxFilterSetting->setCurrentIndex(iniFile.value ( "FilterLevel", 1 ).toInt());
- iniFile.endGroup ();
-
- settingsDirty = false;
-}
-
-//
-// Save the current Settings to the currently 'active' INI-file.
-//
-void SMClientControls::save() {
-
- 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)
-
- iniFile.beginGroup ( "SMTracker" );
- iniFile.setValue ( "FilterLevel", ui.cbxFilterSetting->currentIndex() );
- iniFile.endGroup ();
-
- settingsDirty = false;
-}
-
-//
-// Create a memory-mapping to the faceAPI data.
-// It contains the tracking data, a command-code from FaceTrackNoIR
-//
-//
-bool SMClientControls::SMCreateMapping()
-{
- qDebug() << "SMClientControls::FTCreateMapping says: Starting Function";
-
- //
- // A FileMapping is used to create 'shared memory' between the faceAPI and FaceTrackNoIR.
- //
- // Try to create a FileMapping to the Shared Memory.
- // If one already exists: close it.
- //
- hSMMemMap = CreateFileMappingA( INVALID_HANDLE_VALUE , 00 , PAGE_READWRITE , 0 ,
- sizeof( TFaceData ) + sizeof( HANDLE ) + 100,
- (LPCSTR) SM_MM_DATA );
-
- if ( hSMMemMap != 0 ) {
- qDebug() << "SMClientControls::FTCreateMapping says: FileMapping Created!";
- }
-
- if ( ( hSMMemMap != 0 ) && ( (long) GetLastError == ERROR_ALREADY_EXISTS ) ) {
- CloseHandle( hSMMemMap );
- hSMMemMap = 0;
- }
-
- //
- // Create a new FileMapping, Read/Write access
- //
- hSMMemMap = OpenFileMappingA( FILE_MAP_ALL_ACCESS , false , (LPCSTR) SM_MM_DATA );
- if ( ( hSMMemMap != 0 ) ) {
- qDebug() << "SMClientControls::FTCreateMapping says: FileMapping Created again..." << hSMMemMap;
- pMemData = (SMMemMap *) MapViewOfFile(hSMMemMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(TFaceData));
- if (pMemData != NULL) {
- qDebug() << "SMClientControls::FTCreateMapping says: MapViewOfFile OK.";
-// pMemData->handle = handle; // The game uses the handle, to send a message that the Program-Name was set!
- }
- hSMMutex = CreateMutexA(NULL, false, SM_MUTEX);
- }
- else {
- qDebug() << "SMClientControls::FTCreateMapping says: Error creating Shared Memory for faceAPI!";
- return false;
- }
-
- //if (pMemData != NULL) {
- // pMemData->data.DataID = 1;
- // pMemData->data.CamWidth = 100;
- // pMemData->data.CamHeight = 250;
- //}
-
- return true;
-}
-
-//
-// Show the current engine-settings etc.
-//
-void SMClientControls::doTimUpdate()
-{
- int state = pMemData->state;
- if ( state != prev_state) {
- emit stateChanged(state);
- prev_state = state;
- }
-}
-
-//
-// Show the current engine-settings etc.
-//
-void SMClientControls::showSettings( int newState )
-{
- qDebug() << "SMClientControls::showSettings says: Starting Function";
- switch (newState)
- {
- case SM_API_ENGINE_STATE_TERMINATED:
- ui._engine_state_label->setText("TERMINATED");
- break;
- case SM_API_ENGINE_STATE_INVALID:
- ui._engine_state_label->setText("INVALID");
- break;
- case SM_API_ENGINE_STATE_IDLE:
- ui._engine_state_label->setText("IDLE");
- break;
- case SM_API_ENGINE_STATE_HT_INITIALIZING:
- ui._engine_state_label->setText("INITIALIZING");
- break;
- case SM_API_ENGINE_STATE_HT_TRACKING:
- ui._engine_state_label->setText("TRACKING");
- break;
- case SM_API_ENGINE_STATE_HT_SEARCHING:
- ui._engine_state_label->setText("SEARCHING");
- break;
- default:
- ui._engine_state_label->setText("Unknown State!");
- break;
- }
-
- ui.cbxFilterSetting->setEnabled( (newState == SM_API_ENGINE_STATE_IDLE) );
-}
-
-//
-// Send a command without parameter-value to the tracking Engine.
-//
-void SMClientControls::doCommand(int command)
-{
- if ( (pMemData != NULL) && (WaitForSingleObject(hSMMutex, 100) == WAIT_OBJECT_0) ) {
- pMemData->command = command; // Send command
- ReleaseMutex(hSMMutex);
- }
- return;
-}
-
-//
-// Send a command with integer parameter-value to the tracking Engine.
-//
-void SMClientControls::doCommand(int command, int value)
-{
- if ( (pMemData != NULL) && (WaitForSingleObject(hSMMutex, 100) == WAIT_OBJECT_0) ) {
- pMemData->command = command; // Send command
- pMemData->par_val_int = value;
- ReleaseMutex(hSMMutex);
- }
- return;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Factory function that creates instances if the Tracker-settings dialog object.
-
-// Export both decorated and undecorated names.
-// GetTrackerDialog - Undecorated name, which can be easily used with GetProcAddress
-// Win32 API function.
-// _GetTrackerDialog@0 - Common name decoration for __stdcall functions in C language.
-#pragma comment(linker, "/export:GetTrackerDialog=_GetTrackerDialog@0")
-
-FTNOIR_TRACKER_BASE_EXPORT TRACKERDIALOGHANDLE __stdcall GetTrackerDialog( )
-{
- return new SMClientControls;
+ return new FTNoIR_Tracker;
}
diff --git a/FTNoIR_Tracker_SM/images/SeeingMachines.ico b/FTNoIR_Tracker_SM/images/SeeingMachines.ico
new file mode 100644
index 00000000..19b24c84
--- /dev/null
+++ b/FTNoIR_Tracker_SM/images/SeeingMachines.ico
Binary files differ
diff --git a/FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.h b/FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.h
index 51c22027..4cae5e62 100644
--- a/FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.h
+++ b/FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.h
@@ -7,11 +7,11 @@
#include "Windows.h"
#include "math.h"
-class FTNoIR_Tracker_UDP : public ITracker, QThread
+class FTNoIR_Tracker : public ITracker, QThread
{
public:
- FTNoIR_Tracker_UDP();
- ~FTNoIR_Tracker_UDP();
+ FTNoIR_Tracker();
+ ~FTNoIR_Tracker();
void Release();
void Initialize( QFrame *videoframe );
@@ -20,7 +20,9 @@ public:
bool GiveHeadPoseData(THeadPoseData *data);
void loadSettings();
- bool setParameterValue(const int index, const float newvalue);
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
protected:
void run(); // qthread override run method
@@ -40,30 +42,39 @@ private:
THeadPoseData newHeadPose; // Structure with new headpose
- //parameter list for the filter-function(s)
- enum
- {
- kPortAddress=0, // Index in QList
- kNumFilterParameters // Indicate number of parameters used
- };
- QList<std::pair<float,float>> parameterRange;
- QList<float> parameterValueAsFloat;
-
+ ////parameter list for the filter-function(s)
+ //enum
+ //{
+ // kPortAddress=0, // Index in QList
+ // kNumFilterParameters // Indicate number of parameters used
+ //};
+ //QList<std::pair<float,float>> parameterRange;
+ //QList<float> parameterValueAsFloat;
+
+ float portAddress; // Port-number
+ QString trackerFullName; // Trackers' name and description
+ QString trackerShortName;
+ QString trackerDescription;
};
// Widget that has controls for FTNoIR protocol client-settings.
-class FTNClientControls: public QWidget, Ui::UICFTNClientControls, public ITrackerDialog
+class TrackerControls: public QWidget, Ui::UICFTNClientControls, public ITrackerDialog
{
Q_OBJECT
public:
- explicit FTNClientControls();
- virtual ~FTNClientControls();
+ explicit TrackerControls();
+ virtual ~TrackerControls();
void showEvent ( QShowEvent * event );
void Release(); // Member functions which are accessible from outside the DLL
void Initialize(QWidget *parent);
+ void getFullName(QString *strToBeFilled);
+ void getShortName(QString *strToBeFilled);
+ void getDescription(QString *strToBeFilled);
+ void getIcon(QIcon *icon);
+
private:
Ui::UICFTNClientControls ui;
void loadSettings();
@@ -72,6 +83,10 @@ private:
/** helper **/
bool settingsDirty;
+ QString trackerFullName; // Trackers' name and description
+ QString trackerShortName;
+ QString trackerDescription;
+
private slots:
void doOK();
void doCancel();
diff --git a/FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.vcproj b/FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.vcproj
index b1b383c0..a1533b0a 100644
--- a/FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.vcproj
+++ b/FTNoIR_Tracker_UDP/FTNoIR_Tracker_UDP.vcproj
@@ -171,6 +171,10 @@
RelativePath=".\ftnoir_tracker_udp.cpp"
>
</File>
+ <File
+ RelativePath=".\ftnoir_tracker_udp_dialog.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Header Files"
diff --git a/FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp b/FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp
index 8887deb0..bd7d1d3d 100644
--- a/FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp
+++ b/FTNoIR_Tracker_UDP/ftnoir_tracker_udp.cpp
@@ -1,6 +1,30 @@
+/********************************************************************************
+* FaceTrackNoIR This program is a private project of some enthusiastic *
+* gamers from Holland, who don't like to pay much for *
+* head-tracking. *
+* *
+* Copyright (C) 2012 Wim Vriend (Developing) *
+* Ron Hendriks (Researching and Testing) *
+* *
+* Homepage: http://facetracknoir.sourceforge.net/home/default.htm *
+* *
+* This program is free software; you can redistribute it and/or modify it *
+* under the terms of the GNU General Public License as published by the *
+* Free Software Foundation; either version 3 of the License, or (at your *
+* option) any later version. *
+* *
+* This program is distributed in the hope that it will be useful, but *
+* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
+* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
+* more details. *
+* *
+* You should have received a copy of the GNU General Public License along *
+* with this program; if not, see <http://www.gnu.org/licenses/>. *
+* *
+********************************************************************************/
#include "ftnoir_tracker_udp.h"
-FTNoIR_Tracker_UDP::FTNoIR_Tracker_UDP()
+FTNoIR_Tracker::FTNoIR_Tracker()
{
inSocket = 0;
outSocket = 0;
@@ -9,14 +33,21 @@ FTNoIR_Tracker_UDP::FTNoIR_Tracker_UDP()
m_StopThread = CreateEvent(0, TRUE, FALSE, 0);
m_WaitThread = CreateEvent(0, TRUE, FALSE, 0);
- //allocate memory for the parameters
- parameterValueAsFloat.clear();
- parameterRange.clear();
+ ////allocate memory for the parameters
+ //parameterValueAsFloat.clear();
+ //parameterRange.clear();
- // Add the parameters to the list
- parameterRange.append(std::pair<float,float>(1000.0f,9999.0f));
- parameterValueAsFloat.append(0.0f);
- setParameterValue(kPortAddress,5551.0f);
+ //// Add the parameters to the list
+ //parameterRange.append(std::pair<float,float>(1000.0f,9999.0f));
+ //parameterValueAsFloat.append(0.0f);
+ //setParameterValue(kPortAddress,5551.0f);
+
+ portAddress = 5551;
+
+ //populate the description strings
+ trackerFullName = "FaceTrackNoIR UDP";
+ trackerShortName = "UDP";
+ trackerDescription = "FaceTrackNoIR UDP";
newHeadPose.x = 0.0f;
newHeadPose.y = 0.0f;
@@ -26,7 +57,7 @@ FTNoIR_Tracker_UDP::FTNoIR_Tracker_UDP()
newHeadPose.roll = 0.0f;
}
-FTNoIR_Tracker_UDP::~FTNoIR_Tracker_UDP()
+FTNoIR_Tracker::~FTNoIR_Tracker()
{
// Trigger thread to stop
::SetEvent(m_StopThread);
@@ -52,7 +83,7 @@ FTNoIR_Tracker_UDP::~FTNoIR_Tracker_UDP()
}
/** QThread run @override **/
-void FTNoIR_Tracker_UDP::run() {
+void FTNoIR_Tracker::run() {
int no_bytes;
QHostAddress sender;
@@ -68,7 +99,7 @@ quint16 senderPort;
{
// Set event
::SetEvent(m_WaitThread);
- qDebug() << "FTNoIR_Tracker_UDP::run() terminated run()";
+ qDebug() << "FTNoIR_Tracker::run() terminated run()";
return;
}
@@ -82,7 +113,7 @@ quint16 senderPort;
}
}
else {
- qDebug() << "FTNoIR_Tracker_UDP::run() insocket not ready: exit run()";
+ qDebug() << "FTNoIR_Tracker::run() insocket not ready: exit run()";
return;
}
@@ -92,26 +123,26 @@ quint16 senderPort;
}
}
-void FTNoIR_Tracker_UDP::Release()
+void FTNoIR_Tracker::Release()
{
delete this;
}
-void FTNoIR_Tracker_UDP::Initialize( QFrame *videoframe )
+void FTNoIR_Tracker::Initialize( QFrame *videoframe )
{
- qDebug() << "FTNoIR_Tracker_UDP::Initialize says: Starting ";
+ qDebug() << "FTNoIR_Tracker::Initialize says: Starting ";
loadSettings();
//
// Create UDP-sockets if they don't exist already.
- // They must be created here, because they must be in the new thread (FTNoIR_Tracker_UDP::run())
+ // They must be created here, because they must be in the new thread (FTNoIR_Tracker::run())
//
if (inSocket == 0) {
- qDebug() << "FTNoIR_Tracker_UDP::Initialize() creating insocket";
+ qDebug() << "FTNoIR_Tracker::Initialize() creating insocket";
inSocket = new QUdpSocket();
// Connect the inSocket to the port, to receive messages
- if (!inSocket->bind(QHostAddress::Any, (int) parameterValueAsFloat[kPortAddress], QUdpSocket::ShareAddress )) {
+ if (!inSocket->bind(QHostAddress::Any, (int) portAddress, QUdpSocket::ShareAddress )) {
QMessageBox::warning(0,"FaceTrackNoIR Error", "Unable to bind UDP-port",QMessageBox::Ok,QMessageBox::NoButton);
delete inSocket;
inSocket = 0;
@@ -121,13 +152,13 @@ void FTNoIR_Tracker_UDP::Initialize( QFrame *videoframe )
return;
}
-void FTNoIR_Tracker_UDP::StartTracker( HWND parent_window )
+void FTNoIR_Tracker::StartTracker( HWND parent_window )
{
start( QThread::TimeCriticalPriority );
return;
}
-void FTNoIR_Tracker_UDP::StopTracker( bool exit )
+void FTNoIR_Tracker::StopTracker( bool exit )
{
//
// OK, the thread is not stopped, doing this. That might be dangerous anyway...
@@ -136,7 +167,7 @@ void FTNoIR_Tracker_UDP::StopTracker( bool exit )
return;
}
-bool FTNoIR_Tracker_UDP::GiveHeadPoseData(THeadPoseData *data)
+bool FTNoIR_Tracker::GiveHeadPoseData(THeadPoseData *data)
{
data->x = newHeadPose.x;
data->y = newHeadPose.y;
@@ -147,49 +178,38 @@ bool FTNoIR_Tracker_UDP::GiveHeadPoseData(THeadPoseData *data)
return true;
}
-bool FTNoIR_Tracker_UDP::setParameterValue(const int index, const float newvalue)
+void FTNoIR_Tracker::getFullName(QString *strToBeFilled)
{
- if ((index >= 0) && (index < parameterValueAsFloat.size()))
- {
- //
- // Limit the new value, using the defined range.
- //
- if (newvalue < parameterRange[index].first) {
- parameterValueAsFloat[index] = parameterRange[index].first;
- }
- else {
- if (newvalue > parameterRange[index].second) {
- parameterValueAsFloat[index] = parameterRange[index].second;
- }
- else {
- parameterValueAsFloat[index] = newvalue;
- }
- }
+ *strToBeFilled = trackerFullName;
+};
-// updateParameterString(index);
- return true;
- }
- else
- {
- return false;
- }
+
+void FTNoIR_Tracker::getShortName(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerShortName;
+};
+
+
+void FTNoIR_Tracker::getDescription(QString *strToBeFilled)
+{
+ *strToBeFilled = trackerDescription;
};
//
// Load the current Settings from the currently 'active' INI-file.
//
-void FTNoIR_Tracker_UDP::loadSettings() {
+void FTNoIR_Tracker::loadSettings() {
- qDebug() << "FTNoIR_Tracker_UDP::loadSettings says: Starting ";
+ qDebug() << "FTNoIR_Tracker::loadSettings says: Starting ";
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)
- qDebug() << "FTNoIR_Tracker_UDP::loadSettings says: iniFile = " << currentFile;
+ qDebug() << "FTNoIR_Tracker::loadSettings says: iniFile = " << currentFile;
iniFile.beginGroup ( "FTNClient" );
- setParameterValue(kPortAddress, (float) iniFile.value ( "PortNumber", 5550 ).toInt());
+ portAddress = (float) iniFile.value ( "PortNumber", 5550 ).toInt();
iniFile.endGroup ();
}
@@ -205,159 +225,5 @@ void FTNoIR_Tracker_UDP::loadSettings() {
FTNOIR_TRACKER_BASE_EXPORT TRACKERHANDLE __stdcall GetTracker()
{
- return new FTNoIR_Tracker_UDP;
-}
-
-//*******************************************************************************************************
-// FaceTrackNoIR Client Settings-dialog.
-//*******************************************************************************************************
-
-//
-// Constructor for server-settings-dialog
-//
-FTNClientControls::FTNClientControls() :
-QWidget()
-{
- ui.setupUi( this );
-
- // Connect Qt signals to member-functions
- connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK()));
- connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel()));
- //connect(ui.spinIPFirstNibble, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
- //connect(ui.spinIPSecondNibble, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
- //connect(ui.spinIPThirdNibble, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
- //connect(ui.spinIPFourthNibble, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
- connect(ui.spinPortNumber, SIGNAL(valueChanged(int)), this, SLOT(settingChanged()));
-
- // Load the settings from the current .INI-file
- loadSettings();
-}
-
-//
-// Destructor for server-dialog
-//
-FTNClientControls::~FTNClientControls() {
- qDebug() << "~FTNClientControls() says: started";
-}
-
-void FTNClientControls::Release()
-{
- delete this;
-}
-
-//
-// Initialize tracker-client-dialog
-//
-void FTNClientControls::Initialize(QWidget *parent) {
-
- QPoint offsetpos(100, 100);
- if (parent) {
- this->move(parent->pos() + offsetpos);
- }
- show();
-}
-
-//
-// OK clicked on server-dialog
-//
-void FTNClientControls::doOK() {
- save();
- this->close();
-}
-
-// override show event
-void FTNClientControls::showEvent ( QShowEvent * event ) {
- loadSettings();
-}
-
-//
-// Cancel clicked on server-dialog
-//
-void FTNClientControls::doCancel() {
- //
- // Ask if changed Settings should be saved
- //
- if (settingsDirty) {
- int ret = QMessageBox::question ( this, "Settings have changed", "Do you want to save the settings?", QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel, QMessageBox::Discard );
-
- qDebug() << "doCancel says: answer =" << ret;
-
- switch (ret) {
- case QMessageBox::Save:
- save();
- this->close();
- break;
- case QMessageBox::Discard:
- this->close();
- break;
- case QMessageBox::Cancel:
- // Cancel was clicked
- break;
- default:
- // should never be reached
- break;
- }
- }
- else {
- this->close();
- }
-}
-
-//
-// Load the current Settings from the currently 'active' INI-file.
-//
-void FTNClientControls::loadSettings() {
-
-// qDebug() << "loadSettings says: Starting ";
- 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)
-
-// qDebug() << "loadSettings says: iniFile = " << currentFile;
-
- iniFile.beginGroup ( "FTNClient" );
- //ui.spinIPFirstNibble->setValue( iniFile.value ( "IP-1", 192 ).toInt() );
- //ui.spinIPSecondNibble->setValue( iniFile.value ( "IP-2", 168 ).toInt() );
- //ui.spinIPThirdNibble->setValue( iniFile.value ( "IP-3", 2 ).toInt() );
- //ui.spinIPFourthNibble->setValue( iniFile.value ( "IP-4", 1 ).toInt() );
-
- ui.spinPortNumber->setValue( iniFile.value ( "PortNumber", 5550 ).toInt() );
- iniFile.endGroup ();
-
- settingsDirty = false;
-}
-
-//
-// Save the current Settings to the currently 'active' INI-file.
-//
-void FTNClientControls::save() {
-
- 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)
-
- iniFile.beginGroup ( "FTNClient" );
- //iniFile.setValue ( "IP-1", ui.spinIPFirstNibble->value() );
- //iniFile.setValue ( "IP-2", ui.spinIPSecondNibble->value() );
- //iniFile.setValue ( "IP-3", ui.spinIPThirdNibble->value() );
- //iniFile.setValue ( "IP-4", ui.spinIPFourthNibble->value() );
- iniFile.setValue ( "PortNumber", ui.spinPortNumber->value() );
- iniFile.endGroup ();
-
- settingsDirty = false;
-}
-////////////////////////////////////////////////////////////////////////////////
-// Factory function that creates instances if the Tracker-settings dialog object.
-
-// Export both decorated and undecorated names.
-// GetTrackerDialog - Undecorated name, which can be easily used with GetProcAddress
-// Win32 API function.
-// _GetTrackerDialog@0 - Common name decoration for __stdcall functions in C language.
-#pragma comment(linker, "/export:GetTrackerDialog=_GetTrackerDialog@0")
-
-FTNOIR_TRACKER_BASE_EXPORT TRACKERDIALOGHANDLE __stdcall GetTrackerDialog( )
-{
- return new FTNClientControls;
+ return new FTNoIR_Tracker;
}
diff --git a/FaceTrackNoIR.sln b/FaceTrackNoIR.sln
index d01e19c9..ac8bfd14 100644
--- a/FaceTrackNoIR.sln
+++ b/FaceTrackNoIR.sln
@@ -35,7 +35,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FaceTrackNoIR", "FaceTrackN
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "SetupFTN_Update", "SetupFTN_Update\SetupFTN_Update.vdproj", "{49C224BA-751A-4D15-90B6-E496C43DE308}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTNoIR_Filter_dz1", "FTNoIR_Filter_DZ1\FTNoIR_Filter_DZ1.vcproj", "{2212857A-7634-4E30-BA83-539EC70176E6}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTNoIR_Tracker_FD", "FTNoIR_Tracker_FD\FTNoIR_Tracker_FD.vcproj", "{0FE16301-240D-42B9-9141-12294BA08AC4}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FTNoIR_Filter_Accela", "FTNoIR_Filter_Accela\FTNoIR_Filter_accela.vcproj", "{2212857A-7634-4E30-BA83-539EC70176E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -107,6 +109,10 @@ Global
{49C224BA-751A-4D15-90B6-E496C43DE308}.Debug|Win32.ActiveCfg = Debug
{49C224BA-751A-4D15-90B6-E496C43DE308}.Debug|Win32.Build.0 = Debug
{49C224BA-751A-4D15-90B6-E496C43DE308}.Release|Win32.ActiveCfg = Release
+ {0FE16301-240D-42B9-9141-12294BA08AC4}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0FE16301-240D-42B9-9141-12294BA08AC4}.Debug|Win32.Build.0 = Debug|Win32
+ {0FE16301-240D-42B9-9141-12294BA08AC4}.Release|Win32.ActiveCfg = Release|Win32
+ {0FE16301-240D-42B9-9141-12294BA08AC4}.Release|Win32.Build.0 = Release|Win32
{2212857A-7634-4E30-BA83-539EC70176E6}.Debug|Win32.ActiveCfg = Debug|Win32
{2212857A-7634-4E30-BA83-539EC70176E6}.Debug|Win32.Build.0 = Debug|Win32
{2212857A-7634-4E30-BA83-539EC70176E6}.Release|Win32.ActiveCfg = Release|Win32
diff --git a/FaceTrackNoIR.suo b/FaceTrackNoIR.suo
index b10483b5..e5797c80 100644
--- a/FaceTrackNoIR.suo
+++ b/FaceTrackNoIR.suo
Binary files differ
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index 7e7800bf..bb078b07 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -23,6 +23,10 @@
*********************************************************************************/
/*
Modifications (last one on top):
+ 20120317 - WVR: The Filter and Tracker-code was moved to separate DLL's. The calling-method
+ was changed accordingly. The save() and LoadSettings() functions were adapted.
+ The face-tracker member-functions NotifyZeroed and refreshVideo were added, as
+ requested by Stanislaw.
20110813 - WVR: Changed the presentation of the raw inputs: now a decimal digit will even show when '0'.
20110404 - WVR: Migrated the FlightGear protocol to a separate DLL. The rest must follow...
20110401 - WVR: The about-dialog was shown 'misplaced'. It was corrected.
@@ -223,6 +227,22 @@ QFrame *FaceTrackNoIR::getVideoWidget() {
return ui.video_frame;
}
+//
+// Return the name of the Filter-DLL
+//
+QString FaceTrackNoIR::getCurrentFilterName()
+{
+ return filterFileList.at(ui.iconcomboFilter->currentIndex());
+}
+
+//
+// Return the name of the Tracker-DLL
+//
+QString FaceTrackNoIR::getCurrentTrackerName()
+{
+ return trackerFileList.at(ui.iconcomboTrackerSource->currentIndex());
+}
+
/** read the name of the first video-capturing device at start up **/
/** FaceAPI can only use this first one... **/
void FaceTrackNoIR::GetCameraNameDX() {
@@ -341,6 +361,14 @@ void FaceTrackNoIR::save() {
iniFile.beginGroup ( "TrackerSource" );
iniFile.setValue ( "Selection", ui.iconcomboTrackerSource->currentIndex() );
+ iniFile.setValue ( "DLL", getCurrentTrackerName() );
+ iniFile.endGroup ();
+
+ //
+ // Save the name of the filter in the INI-file.
+ //
+ iniFile.beginGroup ( "Filter" );
+ iniFile.setValue ( "DLL", getCurrentFilterName() );
iniFile.endGroup ();
settingsDirty = false;
@@ -458,16 +486,42 @@ void FaceTrackNoIR::loadSettings() {
setIcon( ui.iconcomboBox->currentIndex() );
iniFile.endGroup ();
+ //
+ // Read the currently selected Tracker from the INI-file.
+ // If the setting "DLL" isn't found (pre-1.7 version), then the setting 'Selection' is evaluated.
+ //
iniFile.beginGroup ( "TrackerSource" );
- ui.iconcomboTrackerSource->setCurrentIndex(iniFile.value ( "Selection", 0 ).toInt());
- trackingSourceSelected( ui.iconcomboTrackerSource->currentIndex() );
+ QString selectedTrackerName = iniFile.value ( "DLL", "" ).toString();
+ qDebug() << "createIconGroupBox says: selectedTrackerName = " << selectedTrackerName;
+ if (selectedTrackerName.length() == 0) {
+ int index = iniFile.value ( "Selection", 0 ).toInt();
+ switch ( index ) {
+ case 0: // Face API
+ selectedTrackerName = "FTNoIR_Tracker_SM.dll";
+ break;
+ case 1: // FTNoir server
+ selectedTrackerName = "FTNoIR_Tracker_UDP.dll";
+ break;
+ default:
+ selectedTrackerName = "FTNoIR_Tracker_SM.dll";
+ break;
+ }
+ }
iniFile.endGroup ();
+ disconnect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ for ( int i = 0; i < trackerFileList.size(); i++) {
+ if (trackerFileList.at(i) == selectedTrackerName) {
+ ui.iconcomboTrackerSource->setCurrentIndex( i );
+ }
+ }
+ connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+
//
// Read the currently selected Filter from the INI-file.
//
iniFile.beginGroup ( "Filter" );
- QString selectedFilterName = iniFile.value ( "Selection", "FTNoIR_Filter_EWMA2.dll" ).toString();
+ QString selectedFilterName = iniFile.value ( "DLL", "FTNoIR_Filter_EWMA2.dll" ).toString();
qDebug() << "createIconGroupBox says: selectedFilterName = " << selectedFilterName;
iniFile.endGroup ();
@@ -542,22 +596,23 @@ void FaceTrackNoIR::startTracker( ) {
ui.btnStartTracker->setEnabled ( false );
ui.btnStopTracker->setEnabled ( true );
- // Engine controls
- switch (ui.iconcomboTrackerSource->currentIndex()) {
- case FT_SM_FACEAPI: // Face API
- ui.btnShowEngineControls->setEnabled ( true ); // Active only when started!
- break;
- case FT_FTNOIR: // FTNoir server
- ui.btnShowEngineControls->setEnabled ( false );
- break;
- default:
- break;
- }
+ //// Engine controls
+ //switch (ui.iconcomboTrackerSource->currentIndex()) {
+ //case FT_SM_FACEAPI: // Face API
+ // ui.btnShowEngineControls->setEnabled ( true ); // Active only when started!
+ // break;
+ //case FT_FTNOIR: // FTNoir server
+ // ui.btnShowEngineControls->setEnabled ( false );
+ // break;
+ //default:
+ // break;
+ //}
// Enable/disable Protocol-server Settings
ui.iconcomboTrackerSource->setEnabled ( false );
ui.iconcomboBox->setEnabled ( false );
ui.btnShowServerControls->setEnabled ( false );
+ ui.iconcomboFilter->setEnabled ( false );
//
// Update the camera-name, FaceAPI can only use the 1st one found!
@@ -642,24 +697,25 @@ void FaceTrackNoIR::stopTracker( ) {
}
ui.btnStartTracker->setEnabled ( true );
ui.btnStopTracker->setEnabled ( false );
- ui.btnShowEngineControls->setEnabled ( false );
+// ui.btnShowEngineControls->setEnabled ( false );
ui.iconcomboBox->setEnabled ( true );
ui.iconcomboTrackerSource->setEnabled ( true );
+ ui.iconcomboFilter->setEnabled ( true );
// Enable/disable Protocol-server Settings
ui.btnShowServerControls->setEnabled ( true );
- // Engine controls
- switch (ui.iconcomboTrackerSource->currentIndex()) {
- case FT_SM_FACEAPI: // Face API
- ui.btnShowEngineControls->setEnabled ( false ); // Active only when started!
- break;
- case FT_FTNOIR: // FTNoir server
- ui.btnShowEngineControls->setEnabled ( true );
- break;
- default:
- break;
- }
+ //// Engine controls
+ //switch (ui.iconcomboTrackerSource->currentIndex()) {
+ //case FT_SM_FACEAPI: // Face API
+ // ui.btnShowEngineControls->setEnabled ( false ); // Active only when started!
+ // break;
+ //case FT_FTNOIR: // FTNoir server
+ // ui.btnShowEngineControls->setEnabled ( true );
+ // break;
+ //default:
+ // break;
+ //}
//
// Stop the timer, so it won't go off again...
@@ -745,6 +801,13 @@ THeadPoseData newdata;
ui.lcdNumOutputRotY->display(QString("%1").arg(newdata.pitch, 0, 'f', 1));
ui.lcdNumOutputRotZ->display(QString("%1").arg(newdata.roll, 0, 'f', 1));
}
+
+ //
+ // Update the video-widget.
+ // Requested by Stanislaw
+ //
+ Tracker::doRefreshVideo();
+
}
/** set the smoothing from the slider **/
@@ -793,21 +856,21 @@ QString libName;
// Show the appropriate Tracker Settings
libName.clear();
+ libName = getCurrentTrackerName();
- switch (ui.iconcomboTrackerSource->currentIndex()) {
- case FT_SM_FACEAPI: // Face API
- qDebug() << "FaceTrackNoIR::showEngineControls case FT_SM_FACEAPI.";
- libName = QString("FTNoIR_Tracker_SM.dll");
- break;
+ //switch (ui.iconcomboTrackerSource->currentIndex()) {
+ // case FT_SM_FACEAPI: // Face API
+ // qDebug() << "FaceTrackNoIR::showEngineControls case FT_SM_FACEAPI.";
+ // break;
- case FT_FTNOIR: // FTNoir server
- qDebug() << "FaceTrackNoIR::showEngineControls case FT_FTNOIR.";
- libName = QString("FTNoIR_Tracker_UDP.dll");
- break;
+ // case FT_FTNOIR: // FTNoir server
+ // qDebug() << "FaceTrackNoIR::showEngineControls case FT_FTNOIR.";
+ // libName = QString("FTNoIR_Tracker.dll");
+ // break;
- default:
- break;
- }
+ // default:
+ // break;
+ //}
//
// Load the Server-settings dialog (if any) and show it.
@@ -1013,7 +1076,8 @@ void FaceTrackNoIR::exit() {
//
void FaceTrackNoIR::createIconGroupBox()
{
-importGetFilterDialog getIT;
+importGetFilterDialog getFilter;
+importGetTrackerDialog getTracker;
QLibrary *filterLib;
QString *filterName;
QIcon *filterIcon;
@@ -1032,14 +1096,6 @@ QIcon *filterIcon;
ui.iconcomboBox->addItem(QIcon(":/images/FS9.ico"), tr("FS2002/FS2004"));
ui.iconcomboBox->addItem(QIcon(":/images/Mouse.ico"), tr("Mouse look"));
- ui.iconcomboTrackerSource->addItem(QIcon(":/images/SeeingMachines.ico"), tr("Face API"));
- ui.iconcomboTrackerSource->addItem(QIcon(":/images/FaceTrackNoIR.ico"), tr("FTNoir server"));
-
-# ifdef USE_VISAGE
- ui.iconcomboTrackerSource->addItem(QIcon(":/images/Visage.ico"), tr("Visage Tracker"));
-# endif
-
-
//
// Get a List of all the Filter-DLL-files in the Program-folder.
//
@@ -1070,13 +1126,13 @@ QIcon *filterIcon;
filterName = new QString("");
filterIcon = new QIcon();
- getIT = (importGetFilterDialog) filterLib->resolve("GetFilterDialog");
- if (getIT) {
- IFilterDialogPtr ptrXyz(getIT());
+ getFilter = (importGetFilterDialog) filterLib->resolve("GetFilterDialog");
+ if (getFilter) {
+ IFilterDialogPtr ptrXyz(getFilter());
if (ptrXyz)
{
pFilterDialog = ptrXyz;
- pFilterDialog->getFilterFullName( filterName );
+ pFilterDialog->getFullName( filterName );
pFilterDialog->getIcon( filterIcon );
qDebug() << "FaceTrackNoIR::showServerControls GetFilterDialog Function Resolved!";
}
@@ -1085,13 +1141,65 @@ QIcon *filterIcon;
}
}
else {
- QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Filter-DLL not loaded, please check if the DLL is version 1.7",QMessageBox::Ok,QMessageBox::NoButton);
}
ui.iconcomboFilter->addItem(*filterIcon, *filterName );
}
connect(ui.iconcomboFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(filterSelected(int)));
+ //
+ // Get a List of all the Filter-DLL-files in the Program-folder.
+ //
+ filters.clear();
+ filters << "FTNoIR_Tracker_*.dll";
+ trackerFileList.clear();
+ trackerFileList = settingsDir.entryList( filters, QDir::Files, QDir::Name );
+
+ //
+ // Add strings to the Listbox.
+ //
+ disconnect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+ ui.iconcomboTrackerSource->clear();
+ for ( int i = 0; i < trackerFileList.size(); i++) {
+
+ qDebug() << "createIconGroupBox says: TrackerName = " << trackerFileList.at(i);
+
+ //
+ // Delete the existing QDialog
+ //
+ if (pTrackerDialog) {
+ pTrackerDialog.Release();
+ }
+
+ // Show the appropriate Protocol-server Settings
+ filterLib = new QLibrary(trackerFileList.at(i));
+ filterName = new QString("");
+ filterIcon = new QIcon();
+
+ getTracker = (importGetTrackerDialog) filterLib->resolve("GetTrackerDialog");
+ if (getTracker) {
+ ITrackerDialogPtr ptrXyz(getTracker());
+ if (ptrXyz)
+ {
+ pTrackerDialog = ptrXyz;
+ pTrackerDialog->getFullName( filterName );
+ pTrackerDialog->getIcon( filterIcon );
+ qDebug() << "FaceTrackNoIR::showServerControls GetTrackerDialog Function Resolved!";
+ }
+ else {
+ qDebug() << "FaceTrackNoIR::showServerControls Function NOT Resolved!";
+ }
+ }
+ else {
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Facetracker-DLL not loaded, please check if the DLL is version 1.7",QMessageBox::Ok,QMessageBox::NoButton);
+ }
+
+ ui.iconcomboTrackerSource->addItem(*filterIcon, *filterName );
+ }
+ connect(ui.iconcomboTrackerSource, SIGNAL(currentIndexChanged(int)), this, SLOT(trackingSourceSelected(int)));
+
+
}
//
@@ -1195,18 +1303,18 @@ void FaceTrackNoIR::iconActivated(QSystemTrayIcon::ActivationReason reason)
void FaceTrackNoIR::trackingSourceSelected(int index)
{
settingsDirty = true;
- switch ( index ) {
- case FT_SM_FACEAPI: // Face API
- ui.btnShowEngineControls->setEnabled ( false );
- break;
- case FT_FTNOIR: // FTNoir server
- ui.video_frame->hide();
- ui.headPoseWidget->show();
- ui.btnShowEngineControls->setEnabled ( true );
- break;
- default:
- break;
- }
+ //switch ( index ) {
+ // case FT_SM_FACEAPI: // Face API
+ // ui.btnShowEngineControls->setEnabled ( false );
+ // break;
+ // case FT_FTNOIR: // FTNoir server
+ // ui.video_frame->hide();
+ // ui.headPoseWidget->show();
+ ui.btnShowEngineControls->setEnabled ( true );
+ // break;
+ // default:
+ // break;
+ //}
}
//
@@ -1233,17 +1341,12 @@ void FaceTrackNoIR::profileSelected(int index)
//
void FaceTrackNoIR::filterSelected(int index)
{
- QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
+ settingsDirty = true;
- QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
- QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
+ //QSettings settings("Abbequerque Inc.", "FaceTrackNoIR"); // Registry settings (in HK_USER)
- //
- // Save the name of the filter in the INI-file. Do this immediately, so the Tracker can just read it from the INI-file to load the filter.
- //
- iniFile.beginGroup ( "Filter" );
- iniFile.setValue ( "Selection", filterFileList.at(ui.iconcomboFilter->currentIndex()) );
- iniFile.endGroup ();
+ //QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/Settings/default.ini" ).toString();
+ //QSettings iniFile( currentFile, QSettings::IniFormat ); // Application settings (in INI-file)
ui.btnShowFilterControls->setEnabled ( true );
}
diff --git a/FaceTrackNoIR/FaceTrackNoIR.h b/FaceTrackNoIR/FaceTrackNoIR.h
index f39062bc..1bc2d7b7 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.h
+++ b/FaceTrackNoIR/FaceTrackNoIR.h
@@ -78,6 +78,8 @@ public:
void updateSettings(); // Update the settings (let Tracker read INI-file).
QFrame *getVideoWidget(); // Get a pointer to the video-widget, to use in the DLL
+ QString getCurrentFilterName(); // Get the name of the selected filter
+ QString getCurrentTrackerName(); // Get the name of the selected face-tracker
private:
Ui::FaceTrackNoIRClass ui;
@@ -86,6 +88,7 @@ private:
QTimer *timUpdateHeadPose; // Timer to display headpose
QStringList iniFileList; // List of INI-files, that are present in the Settings folder
QStringList filterFileList; // List of Filter-DLL-files, that are present in the program-folder
+ QStringList trackerFileList; // List of Tracker-DLL-files, that are present in the program-folder
ITrackerDialogPtr pTrackerDialog; // Pointer to Tracker dialog instance (in DLL)
IProtocolDialogPtr pProtocolDialog; // Pointer to Protocol dialog instance (in DLL)
diff --git a/FaceTrackNoIR/FaceTrackNoIR.qrc b/FaceTrackNoIR/FaceTrackNoIR.qrc
index b24c4e2f..bc1b34f4 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.qrc
+++ b/FaceTrackNoIR/FaceTrackNoIR.qrc
@@ -10,7 +10,6 @@
<file>images/330px-6DOF_en.png</file>
<file>images/Freetrack.ico</file>
<file>images/FaceTrackNoIR.ico</file>
- <file>images/SeeingMachines.ico</file>
<file>images/Mouse.ico</file>
<file>images/FS9.ico</file>
<file>images/FSX.ico</file>
diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui
index 7fa1f42c..3e367e4e 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.ui
+++ b/FaceTrackNoIR/FaceTrackNoIR.ui
@@ -1786,12 +1786,12 @@ background:none;</string>
<number>-1</number>
</property>
<property name="maxVisibleItems">
- <number>3</number>
+ <number>5</number>
</property>
</widget>
<widget class="QPushButton" name="btnShowEngineControls">
<property name="enabled">
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="geometry">
<rect>
@@ -1855,7 +1855,7 @@ background:none;</string>
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupGameProtocol">
+ <widget class="QGroupBox" name="groupFilter">
<property name="minimumSize">
<size>
<width>190</width>
@@ -1872,9 +1872,9 @@ background:none;</string>
<string notr="true"/>
</property>
<property name="title">
- <string>Game protocol</string>
+ <string>Filter</string>
</property>
- <widget class="QComboBox" name="iconcomboBox">
+ <widget class="QComboBox" name="iconcomboFilter">
<property name="geometry">
<rect>
<x>10</x>
@@ -1893,7 +1893,7 @@ background:none;</string>
<number>7</number>
</property>
</widget>
- <widget class="QPushButton" name="btnShowServerControls">
+ <widget class="QPushButton" name="btnShowFilterControls">
<property name="enabled">
<bool>true</bool>
</property>
@@ -1918,7 +1918,7 @@ background:none;</string>
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupFilter">
+ <widget class="QGroupBox" name="groupGameProtocol">
<property name="minimumSize">
<size>
<width>190</width>
@@ -1935,9 +1935,9 @@ background:none;</string>
<string notr="true"/>
</property>
<property name="title">
- <string>Filter</string>
+ <string>Game protocol</string>
</property>
- <widget class="QComboBox" name="iconcomboFilter">
+ <widget class="QComboBox" name="iconcomboBox">
<property name="geometry">
<rect>
<x>10</x>
@@ -1956,7 +1956,7 @@ background:none;</string>
<number>7</number>
</property>
</widget>
- <widget class="QPushButton" name="btnShowFilterControls">
+ <widget class="QPushButton" name="btnShowServerControls">
<property name="enabled">
<bool>true</bool>
</property>
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index cb3a5b79..e529b243 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -3,10 +3,10 @@
* gamers from Holland, who don't like to pay much for *
* head-tracking. *
* *
-* Copyright (C) 2010 Wim Vriend (Developing) *
+* Copyright (C) 2012 Wim Vriend (Developing) *
* Ron Hendriks (Researching and Testing) *
* *
-* Homepage *
+* 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 *
@@ -23,6 +23,10 @@
*********************************************************************************/
/*
Modifications (last one on top):
+ 20120317 - WVR: The Filter and Tracker-code was moved to separate DLL's. The calling-method
+ was changed accordingly.
+ The face-tracker member-functions NotifyZeroed and refreshVideo were added, as
+ requested by Stanislaw.
20110411 - WVR: Finished moving all Protocols to separate C++ projects. Every protocol now
has it's own Class, that's inside it's own DLL. This reduces the size of the program,
makes it more structured and enables a more sophisticated installer.
@@ -120,7 +124,7 @@ QFrame *video_frame;
// Remember the selected client, from the ListBox
// If the Tracker runs, this can NOT be changed...
selectedClient = (FTNoIR_Client) clientID;
- selectedTracker = (FTNoIR_Face_Tracker) facetrackerID;
+// selectedTracker = (FTNoIR_Face_Tracker) facetrackerID;
// Create events
m_StopThread = CreateEvent(0, TRUE, FALSE, 0);
@@ -145,29 +149,30 @@ QFrame *video_frame;
video_frame = mainApp->getVideoWidget();
qDebug() << "Tracker::setup VideoFrame = " << video_frame;
- //
- // Select the Tracker-engine DLL
- //
- switch (selectedTracker) {
- case FT_SM_FACEAPI:
- libName = QString("FTNoIR_Tracker_SM.dll");
- break;
+ ////
+ //// Select the Tracker-engine DLL
+ ////
+ //switch (selectedTracker) {
+ // case FT_SM_FACEAPI:
+ // libName = QString("FTNoIR_Tracker_SM.dll");
+ // break;
- case FT_FTNOIR:
- libName = QString("FTNoIR_Tracker_UDP.dll");
- break;
+ // case FT_FTNOIR:
+ // libName = QString("FTNoIR_Tracker_UDP.dll");
+ // break;
- case FT_VISAGE:
- libName = QString("FTNoIR_Tracker_Visage.dll");
- break;
+ // case FT_VISAGE:
+ // libName = QString("FTNoIR_Tracker_Visage.dll");
+ // break;
- default:
- break;
- }
+ // default:
+ // break;
+ //}
//
// Load the Tracker-engine DLL, get the tracker-class from it and do stuff...
//
+ libName = mainApp->getCurrentTrackerName();
if (!libName.isEmpty()) {
trackerLib = new QLibrary(libName);
getIT = (importGetTracker) trackerLib->resolve("GetTracker");
@@ -182,7 +187,7 @@ QFrame *video_frame;
}
}
else {
- QMessageBox::warning(0,"FaceTrackNoIR Error", "DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
+ QMessageBox::warning(0,"FaceTrackNoIR Error", "Facetracker DLL not loaded",QMessageBox::Ok,QMessageBox::NoButton);
}
}
@@ -255,18 +260,8 @@ QFrame *video_frame;
//
// Load the DLL with the filter-logic and retrieve a pointer to the Filter-class.
- // The name of the filter can be found in the INI-file...
- libName.clear();
- 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)
-
- iniFile.beginGroup ( "Filter" );
- libName = iniFile.value ( "Selection", "FTNoIR_Filter_EWMA2.dll" ).toString();
- qDebug() << "Tracker::Tracker() says: selectedFilterName = " << libName;
- iniFile.endGroup ();
-
+ //
+ libName = mainApp->getCurrentFilterName();
filterLib = new QLibrary(libName);
getFilter = (importGetFilter) filterLib->resolve("GetFilter");
@@ -380,7 +375,7 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
//
if (pFilter) {
QString filterName;
- pFilter->getFilterFullName(&filterName);
+ pFilter->getFullName(&filterName);
qDebug() << "Tracker::run() FilterName = " << filterName;
}
@@ -553,9 +548,12 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
//
// If Set Game Zero is pressed, copy the current values to the offsets.
+ // Change requested by Stanislaw
//
if (Tracker::confid && Tracker::do_game_zero) {
- gamezero_camera.position = gameoutput_camera.position;
+ if (!pTracker->notifyZeroed())
+ gamezero_camera.position = gameoutput_camera.position;
+// gamezero_camera.position = gameoutput_camera.position;
Tracker::do_game_zero = false;
}
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h
index b9a39eba..fa0c5111 100644
--- a/FaceTrackNoIR/tracker.h
+++ b/FaceTrackNoIR/tracker.h
@@ -76,11 +76,11 @@ enum FTNoIR_Client {
MOUSE = 7
};
-enum FTNoIR_Face_Tracker {
- FT_SM_FACEAPI = 0,
- FT_FTNOIR = 1,
- FT_VISAGE = 2
-};
+//enum FTNoIR_Face_Tracker {
+// FT_SM_FACEAPI = 0,
+// FT_FTNOIR = 1,
+// FT_VISAGE = 2
+//};
enum FTNoIR_Tracker_Status {
TRACKER_OFF = 0,
@@ -148,7 +148,7 @@ private:
HANDLE m_WaitThread;
FTNoIR_Client selectedClient;
- FTNoIR_Face_Tracker selectedTracker;
+// FTNoIR_Face_Tracker selectedTracker;
static T6DOF current_camera; // Used for filtering
static T6DOF target_camera;
@@ -231,6 +231,11 @@ public:
static void getHeadPose(THeadPoseData *data); // Return the current headpose data
static void getOutputHeadPose(THeadPoseData *data); // Return the current (processed) headpose data
static IFilterPtr getFilterPtr() { return pFilter; }
+ static void doRefreshVideo() { // Call the face-tracker-function RefreshVideo
+ if (pTracker) {
+ pTracker->refreshVideo();
+ }
+ };
static float getSmoothFromList ( QList<float> *rawList );
static float getDegreesFromRads ( float rads ) { return (rads * 57.295781f); }
diff --git a/List of compatible games.xls b/List of compatible games.xls
index 8b3896e9..1cfdcba3 100644
--- a/List of compatible games.xls
+++ b/List of compatible games.xls
Binary files differ
diff --git a/List of compatible webcams.xls b/List of compatible webcams.xls
index 733464cb..13cde610 100644
--- a/List of compatible webcams.xls
+++ b/List of compatible webcams.xls
Binary files differ
diff --git a/bin/QBezierConfigurator.dll b/bin/QBezierConfigurator.dll
index 48fa2679..a550b132 100644
--- a/bin/QBezierConfigurator.dll
+++ b/bin/QBezierConfigurator.dll
Binary files differ
diff --git a/bin/Settings/ArmA.ini b/bin/Settings/ArmA.ini
index cb6471d1..e7ef044c 100644
--- a/bin/Settings/ArmA.ini
+++ b/bin/Settings/ArmA.ini
@@ -20,7 +20,7 @@ redRoll=60
redX=71
redY=70
redZ=70
-minSmooth=20
+minSmooth=30
powCurve=5
maxSmooth=70
@@ -74,6 +74,14 @@ Inhibit_Y=false
Inhibit_Z=false
SetZero=false
SetEngineStop=false
+Keycode_GameZero=0
+Shift_GameZero=false
+Ctrl_GameZero=false
+Alt_GameZero=false
+Enable_ReverseAxis=true
+RA_Yaw=40
+RA_ZPos=0
+RA_ToZPos=100
[TrackerSource]
Selection=0
diff --git a/bin/Settings/FF5.ini b/bin/Settings/FF5.ini
index 85d0502c..4ed8d77a 100644
--- a/bin/Settings/FF5.ini
+++ b/bin/Settings/FF5.ini
@@ -65,8 +65,8 @@ Keycode_StartStop=207
Shift_StartStop=false
Ctrl_StartStop=false
Alt_StartStop=false
-SetZero=false
-SetEngineStop=false
+SetZero=true
+SetEngineStop=true
Keycode_Inhibit=0
Shift_Inhibit=false
Ctrl_Inhibit=false
@@ -77,3 +77,11 @@ Inhibit_Roll=false
Inhibit_X=false
Inhibit_Y=false
Inhibit_Z=false
+Keycode_GameZero=0
+Shift_GameZero=false
+Ctrl_GameZero=false
+Alt_GameZero=false
+Enable_ReverseAxis=false
+RA_Yaw=40
+RA_ZPos=-20
+RA_ToZPos=50
diff --git a/bin/Settings/FreeFalcon.ini b/bin/Settings/FreeFalcon.ini
index cedef248..5b486b11 100644
--- a/bin/Settings/FreeFalcon.ini
+++ b/bin/Settings/FreeFalcon.ini
@@ -51,7 +51,7 @@ Z_point3=@Variant(\0\0\0\x1a@\x10\0\0\0\0\0\0@G\0\0\0\0\0\0)
Z_point4=@Variant(\0\0\0\x1a@Q\xc0\0\0\0\0\0@I\0\0\0\0\0\0)
[KB_Shortcuts]
-Keycode_Center=0
+Keycode_Center=199
Shift_Center=false
Ctrl_Center=false
Alt_Center=false
@@ -59,3 +59,23 @@ Keycode_StartStop=62
Shift_StartStop=false
Ctrl_StartStop=false
Alt_StartStop=false
+Keycode_GameZero=0
+Shift_GameZero=false
+Ctrl_GameZero=false
+Alt_GameZero=false
+SetZero=true
+SetEngineStop=true
+Keycode_Inhibit=0
+Shift_Inhibit=false
+Ctrl_Inhibit=false
+Alt_Inhibit=false
+Inhibit_Pitch=false
+Inhibit_Yaw=false
+Inhibit_Roll=false
+Inhibit_X=false
+Inhibit_Y=false
+Inhibit_Z=false
+Enable_ReverseAxis=false
+RA_Yaw=40
+RA_ZPos=-20
+RA_ToZPos=50
diff --git a/bin/Settings/IL2.ini b/bin/Settings/IL2.ini
index cdf491c3..7b3a7eca 100644
--- a/bin/Settings/IL2.ini
+++ b/bin/Settings/IL2.ini
@@ -20,9 +20,49 @@ redRoll=75
redX=75
redY=75
redZ=75
+minSmooth=15
+powCurve=10
+maxSmooth=50
[GameProtocol]
-Selection=3
+Selection=4
[PPJoy]
Selection=1
+
+[FTIR]
+useTIRViews=false
+useDummyExe=false
+
+[TrackerSource]
+Selection=0
+
+[KB_Shortcuts]
+Keycode_Center=0
+Shift_Center=false
+Ctrl_Center=false
+Alt_Center=false
+Keycode_GameZero=0
+Shift_GameZero=false
+Ctrl_GameZero=false
+Alt_GameZero=false
+Keycode_StartStop=0
+Shift_StartStop=false
+Ctrl_StartStop=false
+Alt_StartStop=false
+SetZero=true
+SetEngineStop=true
+Keycode_Inhibit=0
+Shift_Inhibit=false
+Ctrl_Inhibit=false
+Alt_Inhibit=false
+Inhibit_Pitch=false
+Inhibit_Yaw=false
+Inhibit_Roll=false
+Inhibit_X=false
+Inhibit_Y=false
+Inhibit_Z=false
+Enable_ReverseAxis=true
+RA_Yaw=40
+RA_ZPos=-20
+RA_ToZPos=50
diff --git a/bin/Settings/Mouse Look.ini b/bin/Settings/Mouse Look.ini
index ef04fa3b..4f03dd8d 100644
--- a/bin/Settings/Mouse Look.ini
+++ b/bin/Settings/Mouse Look.ini
@@ -47,21 +47,22 @@ Inhibit_X=false
Inhibit_Y=false
Inhibit_Z=false
SetZero=true
-SetEngineStop=false
+SetEngineStop=true
Keycode_GameZero=210
Shift_GameZero=false
Ctrl_GameZero=false
Alt_GameZero=false
+Enable_ReverseAxis=false
[Curves]
-Yaw_point1=@Variant(\0\0\0\x1a@\x10\0\0\0\0\0\0@\x14\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\0\0\0\0)
Yaw_point2=@Variant(\0\0\0\x1a@`\xe0\0\0\0\0\0@A\x80\0\0\0\0\0)
Yaw_point3=@Variant(\0\0\0\x1a@f\0\0\0\0\0\0@:\0\0\0\0\0\0)
Yaw_point4=@Variant(\0\0\0\x1a@f\x80\0\0\0\0\0@I\0\0\0\0\0\0)
-Pitch_point1=@Variant(\0\0\0\x1a@\x18\0\0\0\0\0\0@\x18\0\0\0\0\0\0)
-Pitch_point2=@Variant(\0\0\0\x1a@M@\0\0\0\0\0@0\0\0\0\0\0\0)
+Pitch_point1=@Variant(\0\0\0\x1a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0)
+Pitch_point2=@Variant(\0\0\0\x1a@M\x80\0\0\0\0\0@0\0\0\0\0\0\0)
Pitch_point3=@Variant(\0\0\0\x1a@R\x80\0\0\0\0\0@7\0\0\0\0\0\0)
-Pitch_point4=@Variant(\0\0\0\x1a@W \0\0\0\0\0@I\0\0\0\0\0\0)
+Pitch_point4=@Variant(\0\0\0\x1a@W@\0\0\0\0\0@I\0\0\0\0\0\0)
Roll_point1=@Variant(\0\0\0\x1a@\x10\0\0\0\0\0\0@\x14\0\0\0\0\0\0)
Roll_point2=@Variant(\0\0\0\x1a@^\xc0\0\0\0\0\0@?\0\0\0\0\0\0)
Roll_point3=@Variant(\0\0\0\x1a@d@\0\0\0\0\0@B\0\0\0\0\0\0)
@@ -91,6 +92,9 @@ Mouse_X=3
Mouse_Y=2
Mouse_Wheel=7
SensX=23
-SensY=22
+SensY=40
SensWheel=20
useVirtualDesk=false
+
+[SMTracker]
+FilterLevel=2
diff --git a/bin/Settings/SimConnect.ini b/bin/Settings/SimConnect.ini
index 0abc2676..1c323bb6 100644
--- a/bin/Settings/SimConnect.ini
+++ b/bin/Settings/SimConnect.ini
@@ -78,3 +78,11 @@ IP-2=0
IP-3=0
IP-4=1
PortNumber=5550
+
+[FG]
+LocalPCOnly=true
+IP-1=127
+IP-2=0
+IP-3=0
+IP-4=1
+PortNumber=5550
diff --git a/bin/UIElements/SetupFaceTrackNoIR.jpg b/bin/UIElements/SetupFaceTrackNoIR.jpg
index 1f110875..8778c6d5 100644
--- a/bin/UIElements/SetupFaceTrackNoIR.jpg
+++ b/bin/UIElements/SetupFaceTrackNoIR.jpg
Binary files differ