summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-09-28 10:45:03 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-09-28 10:45:03 +0000
commitee53c49af9789553fb51987bd6003ce30344e173 (patch)
tree5360a62d0eb29129c7e18c6a1f9896502d075a6b
parent7eefd68e5ca3323221a8cc0cf32dc4a74d1fb239 (diff)
Added member-function to FunctionConfig, so it accepts default-settings from a QList of QFloats.
Put Stanislaws' Accela-defaults in the Accela-filter: they work fine! git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@172 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
-rw-r--r--FTNoIR_Filter_Accela/FTNoIR_Filter_accela.h35
-rwxr-xr-xFTNoIR_Filter_Accela/ftnoir_filter_accela.cpp15
-rw-r--r--FTNoIR_Filter_Accela/ftnoir_filter_accela_dialog.cpp22
-rw-r--r--FaceTrackNoIR/FaceTrackNoIR.vcproj18
-rw-r--r--FaceTrackNoIR/tracker_types.cpp2
-rw-r--r--QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.cppbin14332 -> 17456 bytes
-rw-r--r--QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.hbin3756 -> 3894 bytes
-rwxr-xr-xQFunctionConfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj4
8 files changed, 83 insertions, 13 deletions
diff --git a/FTNoIR_Filter_Accela/FTNoIR_Filter_accela.h b/FTNoIR_Filter_Accela/FTNoIR_Filter_accela.h
index fbc3804d..742b4d1e 100644
--- a/FTNoIR_Filter_Accela/FTNoIR_Filter_accela.h
+++ b/FTNoIR_Filter_Accela/FTNoIR_Filter_accela.h
@@ -30,6 +30,41 @@
#include "ui_FTNoIR_FilterControls.h"
#include <FunctionConfig.h>
+const QPointF defScaleRotation[] =
+{
+ QPointF(0, 0),
+ QPointF(0.308900523560209, 0.0666666666666667),
+ QPointF(0.565445026178011, 0.226666666666667),
+ QPointF(0.769633507853403, 0.506666666666667),
+ QPointF(0.994764397905759, 1),
+ QPointF(1.23560209424084, 1.61333333333333),
+ QPointF(1.47643979057592, 2.37333333333333),
+ QPointF(1.66492146596859, 3.12),
+ QPointF(1.80628272251309, 3.92),
+ QPointF(1.91623036649215, 4.70666666666667),
+ QPointF(2.00523560209424, 5.44),
+ QPointF(2.07329842931937, 6)
+};
+
+const QPointF defScaleTranslation[] =
+{
+ QPointF(0, 0),
+ QPointF(0.282722513089005, 0.08),
+ QPointF(0.492146596858639, 0.306666666666667),
+ QPointF(0.764397905759162, 0.84),
+ QPointF(1.00523560209424, 1.62666666666667),
+ QPointF(1.17277486910995, 2.78666666666667),
+ QPointF(1.25130890052356, 3.6),
+ QPointF(1.31937172774869, 4.29333333333333),
+ QPointF(1.38219895287958, 4.90666666666667),
+ QPointF(1.43455497382199, 5.65333333333333)
+};
+
+//
+// Macro to determine array-size
+//
+#define NUM_OF(x) (sizeof (x) / sizeof *(x))
+
//*******************************************************************************************************
// FaceTrackNoIR Filter class.
//*******************************************************************************************************
diff --git a/FTNoIR_Filter_Accela/ftnoir_filter_accela.cpp b/FTNoIR_Filter_Accela/ftnoir_filter_accela.cpp
index c71469c4..a6f9264b 100755
--- a/FTNoIR_Filter_Accela/ftnoir_filter_accela.cpp
+++ b/FTNoIR_Filter_Accela/ftnoir_filter_accela.cpp
@@ -36,13 +36,24 @@ void FTNoIR_Filter::Initialize()
}
void FTNoIR_Filter::loadSettings() {
+ QList<QPointF> defPoints;
+
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)
- functionConfig.loadSettings(iniFile);
- translationFunctionConfig.loadSettings(iniFile);
+ defPoints.clear();
+ for (int i = 0; i < NUM_OF(defScaleRotation); i++) { // Get the default points (hardcoded!)
+ defPoints.append(defScaleRotation[i]);
+ }
+ functionConfig.loadSettings(iniFile, defPoints);
+
+ defPoints.clear();
+ for (int i = 0; i < NUM_OF(defScaleTranslation); i++) { // Get the default points (hardcoded!)
+ defPoints.append(defScaleTranslation[i]);
+ }
+ translationFunctionConfig.loadSettings(iniFile, defPoints);
}
void FTNoIR_Filter::FilterHeadPoseData(THeadPoseData *current_camera_position, THeadPoseData *target_camera_position, THeadPoseData *new_camera_position, bool newTarget)
diff --git a/FTNoIR_Filter_Accela/ftnoir_filter_accela_dialog.cpp b/FTNoIR_Filter_Accela/ftnoir_filter_accela_dialog.cpp
index b9a1724c..8af8a280 100644
--- a/FTNoIR_Filter_Accela/ftnoir_filter_accela_dialog.cpp
+++ b/FTNoIR_Filter_Accela/ftnoir_filter_accela_dialog.cpp
@@ -133,21 +133,29 @@ void FilterControls::doCancel() {
// Load the current Settings from the currently 'active' INI-file.
//
void FilterControls::loadSettings() {
+QList<QPointF> defPoints;
+
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_Filter::loadSettings says: iniFile = " << currentFile;
+ qDebug() << "FTNoIR_Filter::loadSettings2 says: iniFile = " << currentFile;
+
- //ui.scalingConfig->setBounds(0, 0, 4.0, 8, 0.25, 0.25);
- //ui.scalingConfig->setSize(1000, 550);
+ qDebug() << "FTNoIR_Filter::loadSettings2 says: size = " << NUM_OF(defScaleRotation);
- //ui.translationScalingConfig->setBounds(0, 0, 4.0, 8, 0.25, 0.25);
- //ui.translationScalingConfig->setSize(1000, 550);
+ defPoints.clear();
+ for (int i = 0; i < NUM_OF(defScaleRotation); i++) { // Get the default points (hardcoded!)
+ defPoints.append(defScaleRotation[i]);
+ }
+ functionConfig.loadSettings(iniFile, defPoints);
- functionConfig.loadSettings(iniFile);
- translationFunctionConfig.loadSettings(iniFile);
+ defPoints.clear();
+ for (int i = 0; i < NUM_OF(defScaleTranslation); i++) { // Get the default points (hardcoded!)
+ defPoints.append(defScaleTranslation[i]);
+ }
+ translationFunctionConfig.loadSettings(iniFile, defPoints);
ui.translationScalingConfig->setConfig(&translationFunctionConfig, currentFile);
ui.scalingConfig->setConfig(&functionConfig, currentFile);
diff --git a/FaceTrackNoIR/FaceTrackNoIR.vcproj b/FaceTrackNoIR/FaceTrackNoIR.vcproj
index 8266d421..57755a93 100644
--- a/FaceTrackNoIR/FaceTrackNoIR.vcproj
+++ b/FaceTrackNoIR/FaceTrackNoIR.vcproj
@@ -151,7 +151,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="qtmaind.lib QtCored4.lib QtGuid4.lib QtOpenGL4.lib QtNetworkd4.lib Strmiids.lib QFunctionConfigurator.lib FSUIPC_User.lib"
+ AdditionalDependencies="qtmaind.lib QtCored4.lib QtGuid4.lib QtOpenGL4.lib QtNetworkd4.lib Strmiids.lib QFunctionConfigurator.lib"
OutputFile="$(OutDir)\$(ProjectName).exe"
AdditionalLibraryDirectories="$(QTDIR)\lib"
IgnoreAllDefaultLibraries="false"
@@ -212,9 +212,17 @@
>
</File>
<File
+ RelativePath=".\rotation.cpp"
+ >
+ </File>
+ <File
RelativePath=".\tracker.cpp"
>
</File>
+ <File
+ RelativePath=".\tracker_types.cpp"
+ >
+ </File>
</Filter>
<Filter
Name="Headers"
@@ -304,6 +312,10 @@
>
</File>
<File
+ RelativePath=".\rotation.h"
+ >
+ </File>
+ <File
RelativePath=".\tracker.h"
>
<FileConfiguration
@@ -329,6 +341,10 @@
/>
</FileConfiguration>
</File>
+ <File
+ RelativePath=".\tracker_types.h"
+ >
+ </File>
</Filter>
<Filter
Name="FormsQt"
diff --git a/FaceTrackNoIR/tracker_types.cpp b/FaceTrackNoIR/tracker_types.cpp
index e3c15807..cdd8d239 100644
--- a/FaceTrackNoIR/tracker_types.cpp
+++ b/FaceTrackNoIR/tracker_types.cpp
@@ -41,4 +41,4 @@ T6DOF operator+(const T6DOF& A, const T6DOF& B)
C.z = A.z + B.z;
//C.frame_number?
return C;
-} \ No newline at end of file
+}
diff --git a/QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.cpp b/QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.cpp
index c9bb9fe1..3ee6e74c 100644
--- a/QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.cpp
+++ b/QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.cpp
Binary files differ
diff --git a/QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.h b/QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.h
index 10c153df..bd000e3a 100644
--- a/QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.h
+++ b/QFunctionConfigurator/QFunctionConfigurator/FunctionConfig.h
Binary files differ
diff --git a/QFunctionConfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj b/QFunctionConfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj
index 44bde25a..04e854cd 100755
--- a/QFunctionConfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj
+++ b/QFunctionConfigurator/QFunctionConfigurator/QFunctionConfigurator.vcproj
@@ -210,7 +210,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Moc&apos;ing $(InputFileName)..."
- CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\qtmain&quot; &quot;-I$(QTDIR)\include\QtDesigner&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I.&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\.&quot; -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfigurator.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;"
/>
@@ -236,7 +236,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Moc&apos;ing $(InputFileName)..."
- CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL &quot;-IC:\Program Files\Microsoft SDKs\Windows\v6.0A\Include&quot; &quot;-I.\GeneratedFiles&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\qtmain&quot; &quot;-I$(QTDIR)\include\QtDesigner&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtGui&quot; &quot;-I.&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;&#x0D;&#x0A;"
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_THREAD_SUPPORT -DQT_PLUGIN -DQDESIGNER_EXPORT_WIDGETS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_DLL -D_WINDLL -I&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\.&quot; -I&quot;.\GeneratedFiles\.&quot; -I&quot;$(QTDIR)\include\.&quot; -I&quot;.\GeneratedFiles\$(ConfigurationName)\.&quot; -I&quot;$(QTDIR)\include\qtmain\.&quot; -I&quot;$(QTDIR)\include\QtDesigner\.&quot; -I&quot;$(QTDIR)\include\QtCore\.&quot; -I&quot;$(QTDIR)\include\QtGui\.&quot; -I&quot;.\.&quot; &quot;.\qFunctionconfiguratorplugin.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;"
/>