summaryrefslogtreecommitdiffhomepage
path: root/FaceTrackNoIR
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-01-09 17:01:44 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-01-09 17:01:44 +0000
commitd6086d8203ae4f4b45f3d97960788d603fc78e16 (patch)
treed27181290c04ca84d27b822aa40b9f7ed904e389 /FaceTrackNoIR
parent10feed03651270c2aa0eb95268e40f0b66fe30d6 (diff)
Implemented filter-settings changeably while Tracker is active.
Should also be handy to have a IFilterPtr, for logging... git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@99 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'FaceTrackNoIR')
-rw-r--r--FaceTrackNoIR/FaceApp.h1
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.cpp29
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.h5
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.ui1329
-rw-r--r--FaceTrackNoIR/tracker.cpp32
-rw-r--r--FaceTrackNoIR/tracker.h13
6 files changed, 462 insertions, 947 deletions
diff --git a/FaceTrackNoIR/FaceApp.h b/FaceTrackNoIR/FaceApp.h
index 75eb6df2..39fd4b2f 100644
--- a/FaceTrackNoIR/FaceApp.h
+++ b/FaceTrackNoIR/FaceApp.h
@@ -21,6 +21,7 @@ private:
int msgID_FTClient;
int msgID_FTIR_Register;
int msgID_FTIR_UnRegister;
+ int msgID_FilterSettingChanged;
};
#endif // FACEAPP_H
diff --git a/FaceTrackNoIR/FaceTrackNoIR.cpp b/FaceTrackNoIR/FaceTrackNoIR.cpp
index 58c60362..73d201c3 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.cpp
+++ b/FaceTrackNoIR/FaceTrackNoIR.cpp
@@ -133,11 +133,6 @@ void FaceTrackNoIR::setupFaceTrackNoIR() {
connect(ui.chkUseEWMA, SIGNAL(stateChanged(int)), this, SLOT(setUseFilter(int)));
- // Connect sliders for reduction factor
- connect(ui.minSmooth, SIGNAL(valueChanged(int)), this, SLOT(setMinSmooth(int)));
- connect(ui.maxSmooth, SIGNAL(valueChanged(int)), this, SLOT(setMaxSmooth(int)));
- connect(ui.powCurve, SIGNAL(valueChanged(int)), this, SLOT(setPowCurve(int)));
-
// Connect slider for smoothing
connect(ui.slideSmoothing, SIGNAL(valueChanged(int)), this, SLOT(setSmoothing(int)));
@@ -528,10 +523,6 @@ void FaceTrackNoIR::startTracker( ) {
tracker->setInvertY (ui.chkInvertY->isChecked() );
tracker->setInvertZ (ui.chkInvertZ->isChecked() );
- tracker->setMinSmooth (ui.minSmooth->value() );
- tracker->setPowCurve (ui.powCurve->value() );
- tracker->setMaxSmooth (ui.maxSmooth->value() );
-
tracker->start( QThread::TimeCriticalPriority );
ui.headPoseWidget->show();
@@ -745,24 +736,6 @@ THeadPoseData newdata;
}
}
-/** set the redhold from the slider **/
-void FaceTrackNoIR::setMinSmooth( int redh ) {
- Tracker::setMinSmooth ( redh );
- settingsDirty = true;
-}
-
-/** set the redhold from the slider **/
-void FaceTrackNoIR::setPowCurve( int redh ) {
- Tracker::setPowCurve ( redh );
- settingsDirty = true;
-}
-
-/** set the redhold from the slider **/
-void FaceTrackNoIR::setMaxSmooth( int redh ) {
- Tracker::setMaxSmooth ( redh );
- settingsDirty = true;
-}
-
/** set the smoothing from the slider **/
void FaceTrackNoIR::setSmoothing( int smooth ) {
@@ -959,7 +932,7 @@ QLibrary *filterLib;
if (ptrXyz)
{
pFilterDialog = ptrXyz;
- pFilterDialog->Initialize( this );
+ pFilterDialog->Initialize( this, Tracker::getFilterPtr() );
qDebug() << "FaceTrackNoIR::showFilterControls GetFilterDialog Function Resolved!";
}
else {
diff --git a/FaceTrackNoIR/FaceTrackNoIR.h b/FaceTrackNoIR/FaceTrackNoIR.h
index c17d21d7..93403be7 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.h
+++ b/FaceTrackNoIR/FaceTrackNoIR.h
@@ -162,11 +162,6 @@ private:
void setUseFilter( int set );
void showHeadPose();
- // EWMA filter sliders
- void setMinSmooth( int redh );
- void setMaxSmooth( int redh );
- void setPowCurve( int redh );
-
//smoothing slider
void setSmoothing( int smooth );
diff --git a/FaceTrackNoIR/FaceTrackNoIR.ui b/FaceTrackNoIR/FaceTrackNoIR.ui
index 7cb74b0a..7fa1f42c 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.ui
+++ b/FaceTrackNoIR/FaceTrackNoIR.ui
@@ -11,7 +11,7 @@
<x>0</x>
<y>0</y>
<width>925</width>
- <height>528</height>
+ <height>428</height>
</rect>
</property>
<property name="sizePolicy">
@@ -1073,6 +1073,18 @@ color: rgb(0, 255, 0);</string>
</property>
<item>
<widget class="QGroupBox" name="groupProfile">
+ <property name="minimumSize">
+ <size>
+ <width>206</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>210</width>
+ <height>120</height>
+ </size>
+ </property>
<property name="title">
<string>Profile</string>
</property>
@@ -1160,793 +1172,429 @@ color: rgb(0, 255, 0);</string>
</widget>
</widget>
</item>
- </layout>
- </item>
- <item row="4" column="0">
- <widget class="QWidget" name="bubbleBigWidget" native="true">
- <property name="minimumSize">
- <size>
- <width>620</width>
- <height>115</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>667</width>
- <height>115</height>
- </size>
- </property>
- <property name="acceptDrops">
- <bool>true</bool>
- </property>
- <property name="styleSheet">
- <string notr="true">background: url(&quot;UIElements/bubble_2_big.png&quot;) no-repeat;
-opacity:100;</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <layout class="QGridLayout" name="gridGlobalSettings">
- <item row="0" column="0">
- <widget class="QLabel" name="lblSensYaw_3">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
-background:none;</string>
- </property>
- <property name="text">
- <string>Global settings</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="lblSensYaw_5">
- <property name="minimumSize">
- <size>
- <width>95</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
-background:none;</string>
- </property>
- <property name="text">
- <string>Use EWMA filtering:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkUseEWMA">
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="lblSensYaw_4">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
-background:none;</string>
- </property>
- <property name="text">
- <string>Smoothing:</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QSlider" name="slideSmoothing">
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>15</height>
- </size>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>50</number>
- </property>
- <property name="pageStep">
- <number>5</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="1">
- <widget class="QSpinBox" name="spinSmoothing">
- <property name="minimumSize">
- <size>
- <width>35</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>50</number>
- </property>
- <property name="value">
- <number>10</number>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="label">
- <property name="styleSheet">
- <string notr="true">color:#ccc;
-background:none;</string>
- </property>
- <property name="text">
- <string>(samples)</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="Line" name="line">
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Sunken</enum>
- </property>
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <item>
+ <widget class="QGroupBox" name="groupGlobalSettings">
+ <property name="minimumSize">
+ <size>
+ <width>206</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Global Settings</string>
+ </property>
+ <widget class="QWidget" name="gridLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>9</x>
+ <y>20</y>
+ <width>171</width>
+ <height>80</height>
+ </rect>
</property>
- </widget>
- </item>
- <item>
- <layout class="QGridLayout" name="gridEWMARotations">
- <item row="0" column="0">
- <widget class="QLabel" name="label_2">
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
-background:none;</string>
- </property>
- <property name="text">
- <string>EWMA</string>
- </property>
- </widget>
- </item>
- <item row="1" 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="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="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="1" 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="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="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="1" 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">color:#ccc;
-background:none;</string>
- </property>
- <property name="text">
- <string>frames</string>
- </property>
- </widget>
- </item>
- <item row="2" 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">color:#ccc;
-background:none;</string>
- </property>
- <property name="text">
- <string>frames</string>
- </property>
- </widget>
- </item>
- <item row="3" 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">color:#ccc;
-background:none;</string>
- </property>
- <property name="text">
- <string>pow</string>
- </property>
- </widget>
- </item>
- <item row="1" 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">color:#ccc;
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
+ <widget class="QLabel" name="lblSensYaw_5">
+ <property name="minimumSize">
+ <size>
+ <width>95</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Min.</string>
- </property>
- </widget>
- </item>
- <item row="2" 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">color:#ccc;
+ </property>
+ <property name="text">
+ <string>Use advanced filtering:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QCheckBox" name="chkUseEWMA">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="lblSensYaw_4">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Max.</string>
- </property>
- </widget>
- </item>
- <item row="3" 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">color:#ccc;
+ </property>
+ <property name="text">
+ <string>Smoothing:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="label">
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Curve</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="Line" name="line_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
+ </property>
+ <property name="text">
+ <string>(samples)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QSlider" name="slideSmoothing">
+ <property name="minimumSize">
+ <size>
+ <width>50</width>
+ <height>15</height>
+ </size>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>50</number>
+ </property>
+ <property name="pageStep">
+ <number>5</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="1">
+ <widget class="QSpinBox" name="spinSmoothing">
+ <property name="minimumSize">
+ <size>
+ <width>35</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>50</number>
+ </property>
+ <property name="value">
+ <number>10</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
</widget>
- </item>
- <item>
- <layout class="QGridLayout" name="gridEWMATranslations">
- <item row="1" column="3">
- <widget class="QCheckBox" name="chkInvertX">
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLabel" name="lblInvert1_2">
- <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">color:#ccc;
+ <widget class="QWidget" name="gridLayoutWidget_2">
+ <property name="geometry">
+ <rect>
+ <x>200</x>
+ <y>20</y>
+ <width>211</width>
+ <height>81</height>
+ </rect>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="3" column="0">
+ <widget class="QLabel" name="lblSensRoll">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Invert</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QCheckBox" name="chkInvertY">
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="3">
- <widget class="QCheckBox" name="chkInvertZ">
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="lblSensX">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
+ </property>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="chkInvertRoll">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QLabel" name="lblSensZ">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="lblSensY">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
+ </property>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QCheckBox" name="chkInvertZ">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="lblSensPitch">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QLabel" name="lblSensZ">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
+ </property>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QCheckBox" name="chkInvertPitch">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLabel" name="lblSensY">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Z</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="lblSensYaw">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
+ </property>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QCheckBox" name="chkInvertY">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="lblSensYaw">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="lblSensPitch">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
+ </property>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="chkInvertYaw">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLabel" name="lblSensX">
+ <property name="minimumSize">
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>150</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="layoutDirection">
+ <enum>Qt::RightToLeft</enum>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="lblSensRoll">
- <property name="minimumSize">
- <size>
- <width>25</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>150</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::RightToLeft</enum>
- </property>
- <property name="styleSheet">
- <string notr="true">color:#ccc;
+ </property>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QCheckBox" name="chkInvertX">
+ <property name="styleSheet">
+ <string notr="true">background:none;</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="lblInvert1_3">
+ <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">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </item>
- <item row="1" column="4">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Minimum</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="1">
- <widget class="QCheckBox" name="chkInvertYaw">
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="chkInvertPitch">
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QCheckBox" name="chkInvertRoll">
- <property name="styleSheet">
- <string notr="true">background:none;</string>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="lblInvert1_3">
- <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">color:#ccc;
+ </property>
+ <property name="text">
+ <string>Invert</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QLabel" name="lblInvert1_2">
+ <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">color:#ccc;
background:none;</string>
- </property>
- <property name="text">
- <string>Invert</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
+ </property>
+ <property name="text">
+ <string>Invert</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_4">
@@ -2110,6 +1758,12 @@ background:none;</string>
<height>120</height>
</size>
</property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
<property name="styleSheet">
<string notr="true"/>
</property>
@@ -2205,7 +1859,13 @@ background:none;</string>
<property name="minimumSize">
<size>
<width>190</width>
- <height>100</height>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
</size>
</property>
<property name="styleSheet">
@@ -2262,7 +1922,13 @@ background:none;</string>
<property name="minimumSize">
<size>
<width>190</width>
- <height>100</height>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
</size>
</property>
<property name="styleSheet">
@@ -2316,6 +1982,19 @@ background:none;</string>
</item>
</layout>
</item>
+ <item row="4" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>30</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</item>
</layout>
@@ -2580,101 +2259,5 @@ background:none;</string>
</hint>
</hints>
</connection>
- <connection>
- <sender>minSmooth</sender>
- <signal>valueChanged(int)</signal>
- <receiver>spinMinSmooth</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>643</x>
- <y>333</y>
- </hint>
- <hint type="destinationlabel">
- <x>691</x>
- <y>335</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinMinSmooth</sender>
- <signal>valueChanged(int)</signal>
- <receiver>minSmooth</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>691</x>
- <y>335</y>
- </hint>
- <hint type="destinationlabel">
- <x>643</x>
- <y>333</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>maxSmooth</sender>
- <signal>valueChanged(int)</signal>
- <receiver>spinMaxSmooth</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>643</x>
- <y>360</y>
- </hint>
- <hint type="destinationlabel">
- <x>691</x>
- <y>362</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinMaxSmooth</sender>
- <signal>valueChanged(int)</signal>
- <receiver>maxSmooth</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>691</x>
- <y>362</y>
- </hint>
- <hint type="destinationlabel">
- <x>643</x>
- <y>360</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>powCurve</sender>
- <signal>valueChanged(int)</signal>
- <receiver>spinPowCurve</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>643</x>
- <y>387</y>
- </hint>
- <hint type="destinationlabel">
- <x>691</x>
- <y>389</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>spinPowCurve</sender>
- <signal>valueChanged(int)</signal>
- <receiver>powCurve</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>691</x>
- <y>389</y>
- </hint>
- <hint type="destinationlabel">
- <x>643</x>
- <y>387</y>
- </hint>
- </hints>
- </connection>
</connections>
</ui>
diff --git a/FaceTrackNoIR/tracker.cpp b/FaceTrackNoIR/tracker.cpp
index 59f6680b..70754a1c 100644
--- a/FaceTrackNoIR/tracker.cpp
+++ b/FaceTrackNoIR/tracker.cpp
@@ -507,7 +507,7 @@ T6DOF gameoutput_camera(0,0,0,0,0,0);
//
// Reset the 'wait' flag. Moving above 90 with the key pressed, will (de-)activate Axis Reverse.
//
- qDebug() << "Tracker::run() says actualZ = " << actualZ << ", terwijl Z_Pos4 = " << Z_Pos4ReverseAxis;
+// qDebug() << "Tracker::run() says actualZ = " << actualZ << ", terwijl Z_Pos4 = " << Z_Pos4ReverseAxis;
if (useAxisReverse) {
Tracker::do_axis_reverse = ((fabs(actualYaw) > YawAngle4ReverseAxis) && (actualZ < Z_Pos4ReverseAxis));
}
@@ -744,36 +744,6 @@ void Tracker::addRaw2List ( QList<float> *rawList, float maxIndex, float raw ) {
}
//
-// Set the filter-value from the GUI.
-//
-void Tracker::setMinSmooth ( int x ) {
- if (Tracker::pFilter) {
- Tracker::pFilter->setParameterValue(0, x);
- qDebug() << "Tracker::setMinSmooth Min Smooting frames set to: " << x;
- }
-}
-
-//
-// Set the filter-value from the GUI.
-//
-void Tracker::setMaxSmooth ( int x ) {
- if (Tracker::pFilter) {
- Tracker::pFilter->setParameterValue(1, x);
- qDebug() << "Tracker::setMaxSmooth Max Smooting frames set to: " << x;
- }
-}
-
-//
-// Set the filter-value from the GUI.
-//
-void Tracker::setPowCurve( int x ) {
- if (Tracker::pFilter) {
- Tracker::pFilter->setParameterValue(2, x);
- qDebug() << "Tracker::setPowCurve Pow Curve set to: " << x;
- }
-}
-
-//
// Get the raw headpose, so it can be displayed.
//
void Tracker::getHeadPose( THeadPoseData *data ) {
diff --git a/FaceTrackNoIR/tracker.h b/FaceTrackNoIR/tracker.h
index dd8a961b..b9a39eba 100644
--- a/FaceTrackNoIR/tracker.h
+++ b/FaceTrackNoIR/tracker.h
@@ -41,7 +41,7 @@
#include "..\ftnoir_tracker_base\FTNoIR_Tracker_base.h"
#include "..\ftnoir_protocol_base\FTNoIR_Protocol_base.h"
#include "..\ftnoir_filter_base\FTNoIR_Filter_base.h"
-#include "AutoClosePtr.h"
+//#include "AutoClosePtr.h"
// 1a. COM-Like usage with smart pointer.
// No need to call `ITracker::Release'; the instance will
@@ -50,8 +50,7 @@ typedef AutoClosePtr<ITracker, void, &ITracker::Release> ITrackerPtr;
typedef ITracker *(WINAPI *importGetTracker)(void);
typedef AutoClosePtr<IProtocol, void, &IProtocol::Release> IProtocolPtr;
typedef IProtocol *(WINAPI *importGetProtocol)(void);
-typedef AutoClosePtr<IFilter, void, &IFilter::Release> IFilterPtr;
-typedef IFilter *(WINAPI *importGetFilter)(void);
+
// include the DirectX Library files
#pragma comment (lib, "dinput8.lib")
@@ -162,9 +161,6 @@ private:
static void addHeadPose( THeadPoseData head_pose );
static void addRaw2List ( QList<float> *rawList, float maxIndex, float raw );
-// static float lowPassFilter ( float newvalue, float *oldvalue, float dt, float coeff);
-// static float rateLimiter ( float newvalue, float *oldvalue, float dt, float max_rate);
-// static float getCorrectedNewRaw ( float NewRaw, float rotNeutral );
/** static member variables for saving the head pose **/
static THeadPoseDOF Pitch; // Head-rotation X-direction (Up/Down)
@@ -232,12 +228,9 @@ public:
static void setInvertZ(bool invert) { Z.invert = invert?-1.0f:+1.0f; }
static void setUseFilter(bool set) { useFilter = set; }
- static void setMinSmooth(int x);
- static void setMaxSmooth(int x);
- static void setPowCurve(int x);
-
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 float getSmoothFromList ( QList<float> *rawList );
static float getDegreesFromRads ( float rads ) { return (rads * 57.295781f); }